Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbdLFOTF (ORCPT ); Wed, 6 Dec 2017 09:19:05 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:62705 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752360AbdLFOS6 (ORCPT ); Wed, 6 Dec 2017 09:18:58 -0500 From: Arnd Bergmann To: Chris Mason , Josef Bacik , David Sterba Cc: Arnd Bergmann , Qu Wenruo , Su Yue , Nikolay Borisov , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: tree-checker: use %zu format string for size_t Date: Wed, 6 Dec 2017 15:18:14 +0100 Message-Id: <20171206141844.788362-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:geZGOpKm59vTWgaS7A7X+Z13kcnYGWDU/AFCsuZWXL0vuK+OwsB kNyQ7iooFocM83zFJB2NqVEz0jHKdTc1QhhPs8rfm1YSFxjmv83+DTbe86qJtqMziQjwwgU Pkk/e7qPTNUc5YyoZ5FW2wSITJB2FYq8tvXF/OldJ8NnTB9Gj2Sk0j/BkDeZGBX1ldQE5no bkZwIhMfCtS1n5tivdKeg== X-UI-Out-Filterresults: notjunk:1;V01:K0:OdUI0Gc6OVI=:GXOI1Kq3tZ/NPGNdvwZ+fM PRfXmaYzhlfPLhrcTG3oEAnBUCpQheziD2uB45D/IWizAKm8WTv0MAhSP0WXKp95t1iFjo404 hX/jSBf9YsMoxjrL8+L6SFsd4mCg9LvBITK6Zg3hCB/laA098QzEa73AAbB4YROuP549Lx0hz 0xUtVnRShyqHMFGdjCUYGmQx8GHU9aeP5DLokfSe53jo1ladh+o+ThFaQ/R6P9xIDxcfXZUGE 564UCgNMfKP7WIRIggb/RKISN49cY7UlwOmXmYU/1Of71SAxbYsXmO3h3XmqUBxUML+gLKjfl p4HS1tGNbxqnQRrFV0rFpr9OAWmKPIBoJXVGvU21vzFi6vG9z3vgikOuy6KcDumyckyYyRZvP m/GW0V4GPTpc1fk6S9zI5KRADKQojr8D84l6iV3fBxrbjZDiilB5Go5h2pI4n5OlmZhlrJXS+ apT4xPWKUKa6qpHu538L0SClj4LIxG+Ox5JK/uGoKtHuU8rNUJ2WN94Y5I+cgXPwr36IEVWev 8ti5ZtNY/FcmMomwo7DF7k4CEKDNkWqQlGNTvnRcwzAZndJKpeUZoMGm9kFBB7T23hYh23v2d 4z2hnJVHMiEuZ98pQ7wZZp6IheHd8TB4O1LlFxyPJxlZ93+vlWy16HWGdc6DzIUacDO88jb8f Lyvr+Bssu43moXLl/H0gpe2whAzTHiWFtZhqCERH3kYfJwUgfRTkJOoZQpvR0b5q0bqnw1aiP QvZv3KabDqw9Mn6RJba0NXFIL0cswqW5O/JkQQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 28 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 --- fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, /* header itself should not cross item boundary */ if (cur + sizeof(*di) > item_size) { dir_item_err(root, leaf, slot, - "dir item header crosses item boundary, have %lu boundary %u", + "dir item header crosses item boundary, have %zu boundary %u", cur + sizeof(*di), item_size); return -EUCLEAN; } -- 2.9.0