summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-01-21 12:32:04 -0800
committerTheodore Ts'o <tytso@mit.edu>2023-01-27 12:33:59 -0500
commitc0ffbcd4dbd64e795e8766b0bf152979ed29d69f (patch)
tree55127578d98531d082054625e9aa4f3c4c4877d5 /lib
parentc093c7527d4c2baedef32d6eb31175e48af3b99d (diff)
downloade2fsprogs-c0ffbcd4dbd64e795e8766b0bf152979ed29d69f.tar.gz
lib/e2p: fix a -Wunused-variable warning in getflags()
This affected Windows builds. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r--lib/e2p/getflags.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/e2p/getflags.c b/lib/e2p/getflags.c
index e4e2ad73..6708cd68 100644
--- a/lib/e2p/getflags.c
+++ b/lib/e2p/getflags.c
@@ -30,8 +30,8 @@
int getflags (int fd, unsigned long * flags)
{
- struct stat buf;
#if HAVE_STAT_FLAGS
+ struct stat buf;
if (fstat (fd, &buf) == -1)
return -1;
@@ -53,6 +53,7 @@ int getflags (int fd, unsigned long * flags)
return 0;
#else
#if HAVE_EXT2_IOCTLS
+ struct stat buf;
int r, f;
if (!fstat(fd, &buf) &&