From patchwork Tue Dec 10 20:44:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 181171 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5998903och; Tue, 10 Dec 2019 12:44:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwnj+sRif+Yl7lYzPgdp0Xr6jOD5h+pO7DtFYDUaB3RnsnpUPPXNs9uRSc9yk63XKSUvtvg X-Received: by 2002:a05:6830:2001:: with SMTP id e1mr25425793otp.97.1576010684010; Tue, 10 Dec 2019 12:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576010684; cv=none; d=google.com; s=arc-20160816; b=psH3bwGEM43CHcJ4nRcaXI9lCS/yyCSed8CZI4m5DIdmpLvjRg5vMvnSQSCjvl1QOZ zXVGuopN2Q76sKNZC76RND6WybLt4ZSY9Z8Q6Pl3VnK5w9seQGVpbpBmksNWrqVg57eQ Rw9u2YFbNzhyd+VZXGlVw0QnJscMfwFwLhb1Jlb7n9wt167aD8S8B5EYL6nUMLclEhWa 7P1/cBm5AbrTY6bSNIbE8DaY0ZrziquMrQimctuXi02vvdPzLoErvmfIj2wxpdNV1lEK ptjpKwAU/XbYTNvRJ2cyM7oQ0PWVC/bbDPrAL4ccYca8PMzRLDkgiFn0nmyx8xzP2Yua tACw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7vCoiHesHtd3lD+gUyeTBZ10pOoBsC+kDwVhhlJPb/U=; b=aIn/QhDjypi1wzPprMu2Jv0ap9XFUj3yQjBtXysR/ir/YpRpIsPGYxo91NiSncmdfK e2lTkLQEfyDHdnf5PWoizDHDZw+6xHnc8W63Fd42Zt5j+Z8qo4ztvktjatwYUBUn8Quc uaOLjv1dxix5Ozsjqy6IhyyTpG3nF2MYYYiYCCC3lh7bOxrT26HjKcO+vSnQuxjDG4Yq RdG+G0LsAy2yFpcaMxf6d+hJXlPCle5RMSP74U/+8FePsek/mT/b+TKTJr/5AyBkzcKO Xh44MD+6ekhMjeXsKF8JtZrWafThGxetxk9G9cc8yjh/r5Oxi2jYtkBT7wqNvopCYON+ NDeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si2460506oth.136.2019.12.10.12.44.43; Tue, 10 Dec 2019 12:44:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbfLJUom (ORCPT + 27 others); Tue, 10 Dec 2019 15:44:42 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:35431 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfLJUom (ORCPT ); Tue, 10 Dec 2019 15:44:42 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M5fQq-1id9Xg41sY-007E8Y; Tue, 10 Dec 2019 21:44:31 +0100 From: Arnd Bergmann To: Chris Mason , Josef Bacik , David Sterba , Qu Wenruo Cc: Arnd Bergmann , Johannes Thumshirn , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: fix format string warning Date: Tue, 10 Dec 2019 21:44:16 +0100 Message-Id: <20191210204429.3383471-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:fkWU2dqOu7RW9WJgIGMm6dYvGG94Cinc06kMtHqOqNk38iTxfmg k5h9IqQvu5n3E5gEjn2ilcUrVt93b5dMbPlbqjic9mt5UivT5iS6LlhARBRv3M6mUh2SEHx FDEdnLS2YOpxM94nghEDd7AAJ1sTg+mMGmLxA5WvewuxEiCVD7Wz3o2sM4zIId29q2llC50 XGfZi2mAR9gfvAPYv/isg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:tSW74QnZ+WA=:86kHDUdr9lu5Hyau6Eigur /LIAAzY68Nt59XSEtNSVGAqm3w/ECsvQtcWhoOkf/sJ/ek8X4OyXrn5nhr5EUWM5DgfO7wMVm NDkI3eiWSH5QT0ywy00s2v80DVGePzi3vSw2OPPDD9Iw8NADylRjSSM6h9cLAfK7/two115RX jIeTHC9ZZiJWcvPjfxBydYy3IrZU8TkL3nPKYLgmnRQKXYU5w6GTWp2dnazGDNbhW2Dwb+O0l UuwMnZgWRZqSlGDcic5clXiSwXX6c838y0p+mKoGM4ixNn2cqUyshLZlWoTDXErF565aIvSBB jPxPL38OwkF08Zjsyjj2FnkuuEh6E0wsuegp2c4gXdl3Gd+Srp8TDK/3XrnT9K+cgJbZyjy8f RqPWfx4yc/s3jb/CbS9VMxR5tqP4PRrDNGBnuobvIOQZ1ELY8PLQ1SzRZwQq/E1w5CeUy6IPB f5gLL+7tOTSK8OIsCdLvGC0nqh1+TYv/5ciEXRFAlocGqKjhqgdBBEvwrnElXpM8SzJi9bye4 3nvxe4xm5fER5DTJcbp9D7FGDX03unqJaSfp3Jl0vc2H0kjXvoAjODIrNlASGa/COIq2/8/m1 rB4ZjpxqqqVJnZ3EpBl5puakwOcqizaSXuOd94gow99knEkj5Aqtw2A4U6mA3mO2t4eu8CwwR DfQFZsvjX2doTGMdwEinT8qylA3wYS4nqsCqGWfkyEpQLFZfytIV+Wed4LGzJisJw+0shcMX5 477gpw+FG4Wgn33+LT9nxmAjFwsc7m9RsLsztI4t2tvJscwyKyyNFi9v0PKVGi8yeQWW6YUtY i8v85XPmt3G8LHEua30p9ohkpIya5EPAh4adkFGsoNatLbdhLurfliilBnWhJYK/YQNToL1M9 oDSgwx3aaR/Qk9eznaoQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To print a size_t, the format string modifier %z should be used instead of %l: fs/btrfs/tree-checker.c: In function 'check_extent_data_item': fs/btrfs/tree-checker.c:230:43: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format=] "invalid item size, have %u expect [%lu, %u)", ~~^ %u Fixes: 153a6d299956 ("btrfs: tree-checker: Check item size before reading file extent type") Signed-off-by: Arnd Bergmann --- fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 Reviewed-by: Josef Bacik diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 493d4d9e0f79..092b8ece36d7 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -227,7 +227,7 @@ static int check_extent_data_item(struct extent_buffer *leaf, */ if (item_size < BTRFS_FILE_EXTENT_INLINE_DATA_START) { file_extent_err(leaf, slot, - "invalid item size, have %u expect [%lu, %u)", + "invalid item size, have %u expect [%zu, %u)", item_size, BTRFS_FILE_EXTENT_INLINE_DATA_START, SZ_4K); return -EUCLEAN;