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
This commit is contained in:
parent
2186340143
commit
3dbe05f61b
@ -3695,7 +3695,7 @@ mfi_dump_all(void)
|
|||||||
struct mfi_command *cm;
|
struct mfi_command *cm;
|
||||||
devclass_t dc;
|
devclass_t dc;
|
||||||
time_t deadline;
|
time_t deadline;
|
||||||
int timedout;
|
int timedout __unused;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dc = devclass_find("mfi");
|
dc = devclass_find("mfi");
|
||||||
@ -3739,7 +3739,7 @@ mfi_timeout(void *data)
|
|||||||
struct mfi_softc *sc = (struct mfi_softc *)data;
|
struct mfi_softc *sc = (struct mfi_softc *)data;
|
||||||
struct mfi_command *cm, *tmp;
|
struct mfi_command *cm, *tmp;
|
||||||
time_t deadline;
|
time_t deadline;
|
||||||
int timedout = 0;
|
int timedout __unused = 0;
|
||||||
|
|
||||||
deadline = time_uptime - mfi_cmd_timeout;
|
deadline = time_uptime - mfi_cmd_timeout;
|
||||||
if (sc->adpreset == 0) {
|
if (sc->adpreset == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user