Commit 994bf9cd authored by Andreas Färber's avatar Andreas Färber Committed by David Sterba
Browse files

btrfs: tree-checker: Fix error format string for size_t

Argument BTRFS_FILE_EXTENT_INLINE_DATA_START is defined as offsetof(),
which returns type size_t, so we need %zu instead of %lu.

This fixes a build warning on 32-bit ARM:

  ../fs/btrfs/tree-checker.c: In function 'check_extent_data_item':
  ../fs/btrfs/tree-checker.c:230:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
    230 |     "invalid item size, have %u expect [%lu, %u)",
        |                                         ~~^
        |                                           long unsigned int
        |                                         %u

Fixes: 153a6d29

 ("btrfs: tree-checker: Check item size before reading file extent type")
Acked-by: default avatarGeert Uytterhoeven <>
Signed-off-by: Andreas Färber's avatarAndreas Färber <>
Reviewed-by: default avatarDavid Sterba <>
Signed-off-by: default avatarDavid Sterba <>
parent 943eb3bf
......@@ -227,7 +227,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
file_extent_err(leaf, slot,
"invalid item size, have %u expect [%lu, %u)",
"invalid item size, have %u expect [%zu, %u)",
return -EUCLEAN;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment