From: Eric Biggers Date: Sat, 21 Jan 2023 20:32:04 +0000 (-0800) Subject: lib/e2p: fix a -Wunused-variable warning in getflags() X-Git-Tag: v1.46.6~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0ffbcd4dbd64e795e8766b0bf152979ed29d69f;p=thirdparty%2Fe2fsprogs.git lib/e2p: fix a -Wunused-variable warning in getflags() This affected Windows builds. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o --- diff --git a/lib/e2p/getflags.c b/lib/e2p/getflags.c index e4e2ad735..6708cd68b 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) &&