Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbdLFOZF (ORCPT ); Wed, 6 Dec 2017 09:25:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:50091 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbdLFOZB (ORCPT ); Wed, 6 Dec 2017 09:25:01 -0500 Date: Wed, 6 Dec 2017 15:23:01 +0100 From: David Sterba To: Arnd Bergmann Cc: Chris Mason , Josef Bacik , David Sterba , Qu Wenruo , Su Yue , Nikolay Borisov , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t Message-ID: <20171206142300.GA3553@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Arnd Bergmann , Chris Mason , Josef Bacik , David Sterba , Qu Wenruo , Su Yue , Nikolay Borisov , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171206141844.788362-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171206141844.788362-1-arnd@arndb.de> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 623 Lines: 12 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 Reviewed-by: David Sterba