static analyzer lint for cmd.c

This commit is contained in:
PatR
2025-01-18 18:35:21 -08:00
parent ba8076b142
commit 3418c871b1

View File

@@ -805,7 +805,7 @@ extcmd_via_menu(void)
* ('w' in wizard mode) */
/* -3: two line menu header, 1 line menu footer (for prompt) */
one_per_line = (nchoices < ROWNO - 3);
accelerator = prevaccelerator = 0;
prevaccelerator = 0;
acount = 0;
for (i = 0; choices[i]; ++i) {
accelerator = choices[i]->ef_txt[matchlevel];
@@ -3479,7 +3479,6 @@ rhack(int key)
}
res = ECMD_FAIL;
prefix_seen = 0;
was_m_prefix = FALSE;
} else {
/* we discard 'const' because some compilers seem to have
trouble with the pointer passed to set_occupation() */
@@ -3526,7 +3525,6 @@ rhack(int key)
return;
}
prefix_seen = tlist;
bad_command = FALSE;
cmdq_ec = NULL;
if (func == do_reqmenu)
was_m_prefix = TRUE;
@@ -3561,7 +3559,6 @@ rhack(int key)
return;
}
prefix_seen = 0;
was_m_prefix = FALSE;
}
/* it is possible to have a result of (ECMD_TIME|ECMD_CANCEL)
[for example, using 'f'ire, manually filling quiver with