diff mbox series

[12/38] lib/e2p: fix a -Wunused-variable warning in getflags()

Message ID 20230121203230.27624-13-ebiggers@kernel.org
State Accepted
Headers show
Series e2fsprogs: misc fixes, and add a GitHub Actions file | expand

Commit Message

Eric Biggers Jan. 21, 2023, 8:32 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

This affected Windows builds.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 lib/e2p/getflags.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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) &&