Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-07 Thread David Sterba
On Thu, Dec 07, 2017 at 08:32:04AM +0800, Qu Wenruo wrote: > > > On 2017年12月06日 22:18, 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: > > > >

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-07 Thread Arnd Bergmann
On Thu, Dec 7, 2017 at 1:32 AM, Qu Wenruo wrote: > > > On 2017年12月06日 22:18, 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: >> >>

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread Qu Wenruo
On 2017年12月06日 22:18, 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': >

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread David Sterba
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': >

[PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread Arnd Bergmann
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

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-10-13 Thread David Sterba
On Fri, Oct 13, 2017 at 11:27:35AM +0200, Arnd Bergmann wrote: > We now get a harmless compile-time on 32-bit architectures: > > fs/btrfs/tree-checker.c: In function 'check_extent_data_item': > fs/btrfs/tree-checker.c:189:70: error: format '%lu' expects argument of type > 'long unsigned int',

[PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-10-13 Thread Arnd Bergmann
We now get a harmless compile-time on 32-bit architectures: fs/btrfs/tree-checker.c: In function 'check_extent_data_item': fs/btrfs/tree-checker.c:189:70: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Werror=format=] This changes the