From patchwork Sat Jan 21 20:32:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 1730059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=gandalf.ozlabs.org; envelope-from=srs0=gbep=5s=vger.kernel.org=linux-ext4-owner@ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=VSW/sBKW; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nzp7d032Gz23gY for ; Sun, 22 Jan 2023 07:37:01 +1100 (AEDT) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Nzp7c6k5mz4xN1 for ; Sun, 22 Jan 2023 07:37:00 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4Nzp7c6ghQz4y03; Sun, 22 Jan 2023 07:37:00 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=VSW/sBKW; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Nzp7c6ZrYz4xN1 for ; Sun, 22 Jan 2023 07:37:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjAUUg7 (ORCPT ); Sat, 21 Jan 2023 15:36:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbjAUUgs (ORCPT ); Sat, 21 Jan 2023 15:36:48 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BB429152 for ; Sat, 21 Jan 2023 12:36:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id CB0EACE0923 for ; Sat, 21 Jan 2023 20:36:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EDC4C4339C for ; Sat, 21 Jan 2023 20:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674333400; bh=YZ2pKcUw+HsnTmBeblDkOs6JI46xxZANugYMD/K+Xx8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VSW/sBKWD/bDQogPkisFfT1wugXETv4b0mRPPP9wfivhvFAMM1LFUwufl4xodTFOr MllNP/WdaCEMYHgndUk9BaQMupSZzTxwCJ0iz3K2kE8NBYaE8rQv/O4d0tSRB8qah7 c2nIvKLz2h65bcBcB5M02gnm0daZsog7/Ow1CIeYhxbBy0CMCvi4qI4gzagXmsTN3S i1QPpBuCvk++vZePQJH3jdQejYrCIASOL39WuCJh4nAWdM8FWUXAgg3T2DXGj84qQC xhML605IPjZCQqpnixsFhrYKlSNTBHVkjfSHQom/mNzV1X5F00i/jw9hhoqfPQTs2K N8+5sN3t5UyJw== From: Eric Biggers To: linux-ext4@vger.kernel.org Subject: [PATCH 09/38] lib/blkid: fix -Wunused-variable warning in blkid_get_dev_size() Date: Sat, 21 Jan 2023 12:32:01 -0800 Message-Id: <20230121203230.27624-10-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230121203230.27624-1-ebiggers@kernel.org> References: <20230121203230.27624-1-ebiggers@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Eric Biggers This showed up when building for Windows. It's hard to conditionally define this variable, so use the 'unused' attribute. Signed-off-by: Eric Biggers --- lib/blkid/Android.bp | 1 - lib/blkid/getsize.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/blkid/Android.bp b/lib/blkid/Android.bp index a40113193..f5d25da4f 100644 --- a/lib/blkid/Android.bp +++ b/lib/blkid/Android.bp @@ -42,7 +42,6 @@ cc_library { include_dirs: ["external/e2fsprogs/include/mingw"], cflags: [ "-Wno-pointer-to-int-cast", - "-Wno-unused-variable", "-Wno-error=typedef-redefinition", ], diff --git a/lib/blkid/getsize.c b/lib/blkid/getsize.c index 75f21d5c1..7a6e6fd86 100644 --- a/lib/blkid/getsize.c +++ b/lib/blkid/getsize.c @@ -75,7 +75,7 @@ static int valid_offset(int fd, blkid_loff_t offset) */ blkid_loff_t blkid_get_dev_size(int fd) { - unsigned long long size64; + unsigned long long size64 __BLKID_ATTR((unused)); blkid_loff_t high, low; #if defined DKIOCGETBLOCKCOUNT && defined DKIOCGETBLOCKSIZE /* For Apple Darwin */