]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Suppress unused variable warning in mfi.c
authorDimitry Andric <dim@FreeBSD.org>
Tue, 19 Jul 2022 19:38:41 +0000 (21:38 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Sat, 23 Jul 2022 08:56:45 +0000 (10:56 +0200)
commit864ff7a6e5051f83146c229634126d28307a3900
tree59f6413288dfa478fe11187dec9b55ff7a23e566
parent00e2af8cd7a619d8901e98c024c2a3046ba364d4
Suppress unused variable warning in mfi.c

With clang 15, the following -Werror warnings are produced:

    sys/dev/mfi/mfi.c:3698:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable]
            int timedout;
                ^
    sys/dev/mfi/mfi.c:3742:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable]
            int timedout = 0;
                ^

Here, 'timedout' are variables that are only used when debugging,
requiring #if 0 statements to be modified. Mark the variables as
potentially unused, to suppress the warnings.

MFC after: 3 days

(cherry picked from commit 3dbe05f61b65a73582aefdc2ee5a50ad2b4390ef)
sys/dev/mfi/mfi.c