Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Thorsten Blum <> | Subject | [PATCH] bcachefs: Use format specifier %u instead of %lu | Date | Mon, 22 Apr 2024 00:35:50 +0200 |
| |
Use %u instead of %lu and cast the value to unsigned int to resolve the following warning on m68k:
format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 12 has type ‘unsigned int’
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> --- fs/bcachefs/btree_io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index 9678b2375bed..45dff1a77366 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -888,9 +888,10 @@ static int validate_bset_keys(struct bch_fs *c, struct btree *b, -BCH_ERR_btree_node_read_err_fixable, c, NULL, b, i, btree_node_bkey_bad_u64s, - "bad k->u64s %u (min %u max %lu)", k->u64s, + "bad k->u64s %u (min %u max %u)", k->u64s, bkeyp_key_u64s(&b->format, k), - U8_MAX - BKEY_U64s + bkeyp_key_u64s(&b->format, k))) + (unsigned int)(U8_MAX - BKEY_U64s + + bkeyp_key_u64s(&b->format, k)))) goto drop_this_key; if (!write) -- 2.44.0
| ![\](/images/icornerr.gif) |