]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
lib/ext2fs: consistently use #ifdefs in ext2fs_print_bmap_statistics()
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:08 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:33:59 +0000 (12:33 -0500)
commit91b2af07bf1a7f64c52ef50044cd0aa68ff0ee06
tree2f393992165b936a27624957ea271c8b694e6e21
parent71c2baa11755344730e67f6b0faa5a6b30764f5a
lib/ext2fs: consistently use #ifdefs in ext2fs_print_bmap_statistics()

Since the 'now' variable is only used to calculate 'inuse', and 'inuse'
is only used when defined(ENABLE_BMAP_STATS_OPS), it makes sense to
guard the declaration and initialization of 'now' and 'inuse' by the
same condition, just like the '*_perc' variables in the same function.

This addresses the following compiler warning with clang -Wall:

        double inuse;
               ^

gen_bitmap64.c:187:9: warning: variable 'inuse' set but not used [-Wunused-but-set-variable]
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/gen_bitmap64.c