lkml.org 
[lkml]   [2017]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] btrfs: tree-checker: use %zu format string for size_t
On Wed, Dec 06, 2017 at 03:18:14PM +0100, Arnd Bergmann wrote:
> 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>

\
 
 \ /
  Last update: 2017-12-06 15:25    [W:0.047 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site