From 6f4e92b760091ff8fcb0e0075c9478c31d0a86ec Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 26 Oct 2008 08:57:13 -0700 Subject: [PATCH] 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 --- nasm.c | 6 +++--- 1 file 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); -- 2.11.4.GIT