]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unused variable warning in ffs_snapshot.c
authorDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jul 2022 19:30:41 +0000 (21:30 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jul 2022 19:32:51 +0000 (21:32 +0200)
commitc9dde6f0c713a027266c52cf94a33a086348c566
tree66041591cb5568b0f5e331e1441f6484ae93fa73
parent08c16dd4bf6ee5649a86fa472104f89b3fbfe71a
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
sys/ufs/ffs/ffs_snapshot.c