From: Eric Biggers <ebiggers@xxxxxxxxxx> 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@xxxxxxxxxx> --- 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