diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-12-06 09:18:14 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 10:08:15 -0500 |
commit | 7cfad65297bfe0aa2996cd72d21c898aa84436d9 (patch) | |
tree | c3b5495baeb30f38862195d0d1549adef5f551fd /fs/btrfs/tree-checker.c | |
parent | b4ff5ad72e9331aabfa92456403946d17c4959d5 (diff) |
btrfs: tree-checker: use %zu format string for size_t
The return value of sizeof() is of type size_t, so we must print it
using the %z format modifier rather than %l to avoid this warning
on some architectures:
fs/btrfs/tree-checker.c: In function 'check_dir_item':
fs/btrfs/tree-checker.c:273:50: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'u32' {aka 'unsigned int'} [-Werror=format=]
Fixes: 005887f2e3e0 ("btrfs: tree-checker: Add checker for dir item")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r-- | fs/btrfs/tree-checker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 66dac0a4b01f..7c55e3ba5a6c 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c | |||
@@ -270,7 +270,7 @@ static int check_dir_item(struct btrfs_root *root, | |||
270 | /* header itself should not cross item boundary */ | 270 | /* header itself should not cross item boundary */ |
271 | if (cur + sizeof(*di) > item_size) { | 271 | if (cur + sizeof(*di) > item_size) { |
272 | dir_item_err(root, leaf, slot, | 272 | dir_item_err(root, leaf, slot, |
273 | "dir item header crosses item boundary, have %lu boundary %u", | 273 | "dir item header crosses item boundary, have %zu boundary %u", |
274 | cur + sizeof(*di), item_size); | 274 | cur + sizeof(*di), item_size); |
275 | return -EUCLEAN; | 275 | return -EUCLEAN; |
276 | } | 276 | } |