mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
BR: 2196966: make the -w/-W options work again
The code to parse the -w/-W options was updating warning_on[], not warning_on_global[], but warning_on[] is reset at the beginning of each pass (to let the warning directive work); as a result the -w/-W options don't actually do anything at all. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
b21141a301
commit
6f4e92b760
6
nasm.c
6
nasm.c
@ -835,13 +835,13 @@ static bool process_arg(char *p, char *q)
|
||||
if (!nasm_stricmp(param, warnings[i].name))
|
||||
break;
|
||||
if (i <= ERR_WARN_MAX)
|
||||
warning_on[i] = do_warn;
|
||||
warning_on_global[i] = do_warn;
|
||||
else if (!nasm_stricmp(param, "all"))
|
||||
for (i = 1; i <= ERR_WARN_MAX; i++)
|
||||
warning_on[i] = do_warn;
|
||||
warning_on_global[i] = do_warn;
|
||||
else if (!nasm_stricmp(param, "none"))
|
||||
for (i = 1; i <= ERR_WARN_MAX; i++)
|
||||
warning_on[i] = !do_warn;
|
||||
warning_on_global[i] = !do_warn;
|
||||
else
|
||||
report_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
|
||||
"invalid warning `%s'", param);
|
||||
|
Loading…
Reference in New Issue
Block a user