From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3F5C43612 for ; Tue, 15 Jan 2019 16:59:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FB9220645 for ; Tue, 15 Jan 2019 16:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547571576; bh=GFRLipEkRrX6uppitMy2XAUe4goycFeKaWURbInAUfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IzHBtrExJopYEajkMswUhuiCYzp1V5MmedLpcALNSVViYpjc7r+ylW+8TAjpQwmiF xvpBciu/TUbb2YlXKVmOqO3lphqqGscgz414RznGZvZsUa0b8R0UKkYUm8QnbVeDlL USNJ7dyp8YXgjFkHQaAN4JPbTFvXTplbS/MjUvKE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732271AbfAOQjI (ORCPT ); Tue, 15 Jan 2019 11:39:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:55198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732225AbfAOQjH (ORCPT ); Tue, 15 Jan 2019 11:39:07 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 981B320859; Tue, 15 Jan 2019 16:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570347; bh=GFRLipEkRrX6uppitMy2XAUe4goycFeKaWURbInAUfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pXHCOk6o7mZppOtK5shw3b+tNeXPw2Y8DuKhL4Nt+SVL4LZspMf/pxD3eePpkg5of u06SlBDxGqx7AN30T449engIFYtgtJAYhEobE85eA6VLVyAnvPx5mQ31ZSJT3y2xIc FrtpRdueMvDJL8LSacAhQDBArlJS7ptIQ0/CKMig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , David Sterba , Ben Hutchings Subject: [PATCH 4.4 24/51] btrfs: tree-checker: use %zu format string for size_t Date: Tue, 15 Jan 2019 17:35:20 +0100 Message-Id: <20190115154850.065567596@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154846.928796000@linuxfoundation.org> References: <20190115154846.928796000@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 7cfad65297bfe0aa2996cd72d21c898aa84436d9 upstream. 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 Signed-off-by: David Sterba Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -223,7 +223,7 @@ static int check_dir_item(struct btrfs_r /* 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; }