Commit-ID: b4f734fb844dbc4cc29304e952b33aa9fc96e398
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=b4f734fb844dbc4cc29304e952b33aa9fc96e398
Author: H. Peter Anvin <hp...@li...>
AuthorDate: Mon, 9 May 2016 12:13:08 -0700
Committer: H. Peter Anvin <hp...@li...>
CommitDate: Mon, 9 May 2016 12:13:08 -0700
Ignore unrecognized warning names
If we get an invalid warning name passed to the -w/-W option or the
[warning] directive, ignore it. This may be a warning name enabled in
a future version of NASM, and it is rather pointless to error out on
it.
Signed-off-by: H. Peter Anvin <hp...@li...>
---
nasm.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/nasm.c b/nasm.c
index 2c7b22a..f46cf4f 100644
--- a/nasm.c
+++ b/nasm.c
@@ -893,8 +893,7 @@ set_warning:
for (i = 1; i <= ERR_WARN_MAX; i++)
warning_on_global[i] = !do_warn;
} else {
- nasm_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
- "invalid warning `%s'", param);
+ /* Ignore invalid warning names; forward compatibility */
}
break;
@@ -1518,9 +1517,7 @@ static void assemble_file(char *fname, StrList **depend_ptr)
warning_on[i] = warning_on_global[i];
break;
}
- } else
- nasm_error(ERR_NONFATAL,
- "invalid warning id in WARNING directive");
+ }
break;
case D_CPU: /* [CPU] */
cpu = get_cpu(value);
|