]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
misc/mke2fs: fix a -Wunused-variable warning in PRS()
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:25 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:38:31 +0000 (12:38 -0500)
This showed up when building for Windows.

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

index f486de83b70c5332792e19fc1a371ec925438010..ba5f179a2539941bd9b5a3697e48f567712763ea 100644 (file)
@@ -1572,7 +1572,6 @@ static void PRS(int argc, char *argv[])
         * Finally, we complain about fs_blocks_count > 2^32 on a non-64bit fs.
         */
        blk64_t         fs_blocks_count = 0;
-       long            sysval;
        int             s_opt = -1, r_opt = -1;
        char            *fs_features = 0;
        int             fs_features_size = 0;
@@ -1606,9 +1605,12 @@ static void PRS(int argc, char *argv[])
 #define _SC_PAGESIZE _SC_PAGE_SIZE
 #endif
 #ifdef _SC_PAGESIZE
-       sysval = sysconf(_SC_PAGESIZE);
-       if (sysval > 0)
-               sys_page_size = sysval;
+       {
+               long sysval = sysconf(_SC_PAGESIZE);
+
+               if (sysval > 0)
+                       sys_page_size = sysval;
+       }
 #endif /* _SC_PAGESIZE */
 #endif /* HAVE_SYSCONF */