]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
btrfs: tree-checker: use %zu format string for size_t
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Dec 2017 14:18:14 +0000 (15:18 +0100)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:56 +0000 (09:44 -0600)
commit530c0684e7069d692df32b0347b36684f53f3d44
tree9b5489dd85191f4336d400aa937befadc3113e34
parent95c808e6319445926aed232d20f2bbbdfbd9d748
btrfs: tree-checker: use %zu format string for size_t

BugLink: https://bugs.launchpad.net/bugs/1836968
commit 7cfad65297bfe0aa2996cd72d21c898aa84436d9 upstream.

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>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/btrfs/tree-checker.c