* [f2fs-dev] [PATCH] Fix build error in Android
@ 2025-08-01 16:13 Jaegeuk Kim via Linux-f2fs-devel
2025-08-05 5:49 ` Chao Yu via Linux-f2fs-devel
0 siblings, 1 reply; 2+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2025-08-01 16:13 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
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>
---
mkfs/f2fs_format.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 7e8bdccf2241..b98976c6ffa8 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -389,7 +389,8 @@ static int f2fs_prepare_super_block(void)
* aligned at the zone.
*/
MSG(1, "\tError: Unaligned segment0 start (%u) for zoned LU (zone_blocks: %"PRIu64")\n",
- get_sb(segment0_blkaddr), c.zone_blocks);
+ get_sb(segment0_blkaddr),
+ (uint64_t)c.zone_blocks);
return -1;
} else if (c.ndevs > 1 &&
(c.devices[1].start_blkaddr - get_sb(segment0_blkaddr)) % c.zone_blocks) {
@@ -401,7 +402,8 @@ static int f2fs_prepare_super_block(void)
*/
MSG(1, "\tError: Unaligned start (%"PRIu64") for zoned LU from segment0 (%u) (zone_blocks: %"PRIu64")\n",
c.devices[1].start_blkaddr,
- get_sb(segment0_blkaddr), c.zone_blocks);
+ get_sb(segment0_blkaddr),
+ (uint64_t)c.zone_blocks);
return -1;
}
}
--
2.50.1.565.gc32cd1483b-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] Fix build error in Android
2025-08-01 16:13 [f2fs-dev] [PATCH] Fix build error in Android Jaegeuk Kim via Linux-f2fs-devel
@ 2025-08-05 5:49 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-08-05 5:49 UTC (permalink / raw)
To: Jaegeuk Kim, linux-f2fs-devel
On 8/2/25 00:13, Jaegeuk Kim via Linux-f2fs-devel wrote:
> 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>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-05 5:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-01 16:13 [f2fs-dev] [PATCH] Fix build error in Android Jaegeuk Kim via Linux-f2fs-devel
2025-08-05 5:49 ` Chao Yu via Linux-f2fs-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).