libf2fs: fix incorrect type define of declaration
authorChao Yu <chao2.yu@samsung.com>
Fri, 18 Dec 2015 07:57:10 +0000 (15:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 18 Dec 2015 22:13:05 +0000 (14:13 -0800)
When compiling f2fs toolset in 32-bits machine, following error was
reported:

libf2fs.c:342:5: error: conflicting types for 'find_next_bit_le'
../include/f2fs_fs.h:864:22: note: previous declaration of 'find_next_bit_le' was here
libf2fs.c:348:5: error: conflicting types for 'find_next_zero_bit_le'
../include/f2fs_fs.h:865:22: note: previous declaration of 'find_next_zero_bit_le' was here

This is because our type of return value(u64 in define) and (unsigned long
in declaration) of find_next_{,zero_}bit_le were not same in non-64-bits
machine:

extern unsigned long find_next_bit_le(const u8 *, u64, u64);
u64 find_next_bit_le(const u8 *addr, u64 size, u64 offset)

Fix it.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
include/f2fs_fs.h

index f9060f2..e1eeb6e 100644 (file)
@@ -861,8 +861,8 @@ extern int test_bit_le(u32, const u8 *);
 extern int f2fs_test_bit(unsigned int, const char *);
 extern int f2fs_set_bit(unsigned int, char *);
 extern int f2fs_clear_bit(unsigned int, char *);
-extern unsigned long find_next_bit_le(const u8 *, u64, u64);
-extern unsigned long find_next_zero_bit_le(const u8 *, u64, u64);
+extern u64 find_next_bit_le(const u8 *, u64, u64);
+extern u64 find_next_zero_bit_le(const u8 *, u64, u64);
 
 extern u_int32_t f2fs_cal_crc32(u_int32_t, void *, int);
 extern int f2fs_crc_valid(u_int32_t blk_crc, void *buf, int len);