diff options
| author | Nathan Chancellor <[email protected]> | 2023-09-12 19:15:41 +0000 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2023-10-22 21:10:13 +0000 |
| commit | 0940863fd2186c521d91aaf58b28d872fb1bba6c (patch) | |
| tree | 86bcc805de1ebdc4ec250b8f70981361a8bafd98 /fs/bcachefs/btree_trans_commit.c | |
| parent | bcachefs: Fix -Wformat in bch2_alloc_v4_invalid() (diff) | |
| download | kernel-0940863fd2186c521d91aaf58b28d872fb1bba6c.tar.gz kernel-0940863fd2186c521d91aaf58b28d872fb1bba6c.zip | |
bcachefs: Fix -Wformat in bch2_bucket_gens_invalid()
When building bcachefs for 32-bit ARM, there is a compiler warning in
bch2_bucket_gens_invalid() due to use of an incorrect format specifier:
fs/bcachefs/alloc_background.c:530:10: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
529 | prt_printf(err, "bad val size (%lu != %zu)",
| ~~~
| %zu
530 | bkey_val_bytes(k.k), sizeof(struct bch_bucket_gens));
| ^~~~~~~~~~~~~~~~~~~
fs/bcachefs/util.h:223:54: note: expanded from macro 'prt_printf'
223 | #define prt_printf(_out, ...) bch2_prt_printf(_out, __VA_ARGS__)
| ^~~~~~~~~~~
On 64-bit architectures, size_t is 'unsigned long', so there is no
warning when using %lu but on 32-bit architectures, size_t is 'unsigned
int'. Use '%zu', the format specifier for 'size_t', to eliminate the
warning.
Fixes: 4be0d766a7e9 ("bcachefs: bucket_gens btree")
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions
