libf2fs: fix incorrect type define of declaration
PATCH 1/1 libf2fs: fix incorrect type define of declaration
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 <[email protected]>
--- include/f2fs_fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/f2fs_fs.h +2 -2
@@ -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);
Signature · 5 lines
2.6.3 ------------------------------------------------------------------------------