HomeFreeBSD

Fix unused variable warning in ffs_snapshot.c

Description

Fix unused variable warning in ffs_snapshot.c

With clang 15, the following -Werror warning is produced:

sys/ufs/ffs/ffs_snapshot.c:204:7: error: variable 'redo' set but not used [-Werror,-Wunused-but-set-variable]
        long redo = 0, snaplistsize = 0;
             ^

The 'redo' variable is only used when DIAGNOSTIC is defined. Ensure it
is only declared and set in that case.

MFC after: 3 days

Details

Provenance
dimAuthored on Jul 26 2022, 7:30 PM
Parents
rG08c16dd4bf6e: Adjust function definition in ufs_dirhash.c to avoid clang 15 warnings
Branches
Unknown
Tags
Unknown