On 2017年07月20日 00:45, Marco Lorenzo Crociani wrote:
On 18/07/2017 08:33, Gu Jinxiang wrote:
For any one who wants to try it, it can be get from my repo:
https://github.com/gujx2017/btrfs-progs/tree/offline_scrub
Hi,
I'm getting this error during make:
[CC] csum.o
csum.c: In function ‘btrfs_read_data_csums’:
csum.c:119:3: error: ‘for’ loop initial declarations are only allowed in
C99 mode
for (u32 i = 0; i != final_len / csum_size; i++)
^
Oh, this is indeed a problem.
Introduced in the version which bitmap for csum is introduced.
Should be fixed to use c90 standard (at least gnu90).
csum.c:119:3: note: use option -std=c99 or -std=gnu99 to compile your code
make: *** [csum.o] Errore 1
git clone https://github.com/gujx2017/btrfs-progs.git
git checkout offline_scrub
./autogen.sh
./configure
make
CentOS 7.3
kernel 4.12
Seems to be related to gcc version.
Newer gcc use higher std which doesn't have such problem, while gcc 4.8
is still using lower standard and will print output such warning.
I'll try to enhance the Makefile to use gnu90 standard to avoid such
problem.
Thanks,
Qu
No problem compiling official btrfs-progs v4.11.1
Regards,
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html