Skip to content

Commit 589ca2d

Browse files
author
Jaegeuk Kim
committed
Fix build error in Android
external/f2fs-tools/mkfs/f2fs_format.c:392:31: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] 391 | MSG(1, "\tError: Unaligned segment0 start (%u) for zoned LU (zone_blocks: %"PRIu64")\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 392 | get_sb(segment0_blkaddr), c.zone_blocks); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/f2fs-tools/include/f2fs_fs.h:289:18: note: expanded from macro 'MSG' 289 | printf(fmt, ##__VA_ARGS__); \ | ~~~ ^~~~~~~~~~~ external/f2fs-tools/mkfs/f2fs_format.c:404:31: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] 402 | MSG(1, "\tError: Unaligned start (%"PRIu64") for zoned LU from segment0 (%u) (zone_blocks: %"PRIu64")\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 403 | c.devices[1].start_blkaddr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 404 | get_sb(segment0_blkaddr), c.zone_blocks); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/f2fs-tools/include/f2fs_fs.h:289:18: note: expanded from macro 'MSG' 289 | printf(fmt, ##__VA_ARGS__); \ | ~~~ ^~~~~~~~~~~ Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 4cc9025 commit 589ca2d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

mkfs/f2fs_format.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ static int f2fs_prepare_super_block(void)
389389
* aligned at the zone.
390390
*/
391391
MSG(1, "\tError: Unaligned segment0 start (%u) for zoned LU (zone_blocks: %"PRIu64")\n",
392-
get_sb(segment0_blkaddr), c.zone_blocks);
392+
get_sb(segment0_blkaddr),
393+
(uint64_t)c.zone_blocks);
393394
return -1;
394395
} else if (c.ndevs > 1 &&
395396
(c.devices[1].start_blkaddr - get_sb(segment0_blkaddr)) % c.zone_blocks) {
@@ -401,7 +402,8 @@ static int f2fs_prepare_super_block(void)
401402
*/
402403
MSG(1, "\tError: Unaligned start (%"PRIu64") for zoned LU from segment0 (%u) (zone_blocks: %"PRIu64")\n",
403404
c.devices[1].start_blkaddr,
404-
get_sb(segment0_blkaddr), c.zone_blocks);
405+
get_sb(segment0_blkaddr),
406+
(uint64_t)c.zone_blocks);
405407
return -1;
406408
}
407409
}

0 commit comments

Comments
 (0)