Whamcloud - gitweb
lib/e2p: fix a -Wunused-variable warning in getflags()
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:04 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:33:59 +0000 (12:33 -0500)
This affected Windows builds.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/e2p/getflags.c

index e4e2ad7..6708cd6 100644 (file)
@@ -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) &&