mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
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 <hpa@linux.intel.com>
This commit is contained in:
7
nasm.c
7
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);
|
||||
|
Reference in New Issue
Block a user