lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 21 Jan 2023 12:32:01 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     linux-ext4@...r.kernel.org
Subject: [PATCH 09/38] lib/blkid: fix -Wunused-variable warning in blkid_get_dev_size()

From: Eric Biggers <ebiggers@...gle.com>

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 <ebiggers@...gle.com>
---
 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 */
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ