summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-26 08:57:13 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-26 08:57:13 -0700
commit6f4e92b760091ff8fcb0e0075c9478c31d0a86ec (patch)
tree458166c76182253687a4c5722d2ea6fa368fac58
parentb21141a30128d2d2d8001cd4d9babab18366b867 (diff)
downloadnasm-6f4e92b760091ff8fcb0e0075c9478c31d0a86ec.tar.gz
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>
-rw-r--r--nasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nasm.c b/nasm.c
index 76d1eee0..a800db68 100644
--- a/nasm.c
+++ b/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);