diff options
author | Eric Biggers <ebiggers@google.com> | 2023-01-21 12:32:01 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-01-27 12:33:59 -0500 |
commit | 8eb4a1d71d539a3867b4ddc1ab7c924b033218a6 (patch) | |
tree | 135bd8fe5865b34a3c89e1598189ad47c5d25663 | |
parent | ae92b8f549cfc02f2231b3639ddf8a1b50b379ad (diff) | |
download | e2fsprogs-8eb4a1d71d539a3867b4ddc1ab7c924b033218a6.tar.gz |
lib/blkid: fix -Wunused-variable warning in blkid_get_dev_size()
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@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | lib/blkid/Android.bp | 1 | ||||
-rw-r--r-- | lib/blkid/getsize.c | 2 |
2 files changed, 1 insertions, 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 */ |