lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1811ab1-093a-38c1-0461-e49d4765b86e@redhat.com>
Date:   Sat, 23 Jun 2018 14:52:07 -0500
From:   Eric Sandeen <sandeen@...hat.com>
To:     "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] libext2fs: remove c99 idiom to fix build

On 6/23/18 2:51 PM, Eric Sandeen wrote:
> hashmap.c: In function ‘ext2fs_hashmap_free’:
> hashmap.c:72:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
>   for (size_t i = 0; i < h->size; ++i) {
>   ^
> hashmap.c:72:2: note: use option -std=c99 or -std=gnu99 to compile your code
> make[2]: *** [hashmap.o] Error 1

Might add:

Fixes: 555a0fc ("AOSP: e2fsdroid/libext2fs: move hashmap into libext2fs")

> Signed-off-by: Eric Sandeen <sandeen@...hat.com>
> ---
> 
> diff --git a/lib/ext2fs/hashmap.c b/lib/ext2fs/hashmap.c
> index ade5d89..3d8ee81 100644
> --- a/lib/ext2fs/hashmap.c
> +++ b/lib/ext2fs/hashmap.c
> @@ -69,7 +69,9 @@ void *ext2fs_hashmap_iter_in_order(struct ext2fs_hashmap *h,
>  
>  void ext2fs_hashmap_free(struct ext2fs_hashmap *h)
>  {
> -	for (size_t i = 0; i < h->size; ++i) {
> +	size_t	i;
> +
> +	for (i = 0; i < h->size; ++i) {
>  		struct ext2fs_hashmap_entry *it = h->entries[i];
>  		while (it) {
>  			struct ext2fs_hashmap_entry *tmp = it->next;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ