nasm/asm
H. Peter Anvin (Intel) 9248a85f97 asm/error.c: handle -w* during command line parsing
During command line parsing, warning_state_init is NULL as the warning
stack is naturally not set up yet. Furthermore, -w* would mean return
to command-line default, which isn't even defined yet.

Rather than ignoring it or returning an error, do something useful by
allowing -w* to reset to the *compile time* default when specified on
the command line.

Reported-by: <momo-trip@github.com>
Fixes: https://github.com/netwide-assembler/nasm/issues/155
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2026-07-07 15:43:40 -07:00
..
asmutil.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
assemble.c listing: allow the user to suppress abbreviation of TIMES and INCBIN 2026-06-28 18:11:40 -07:00
assemble.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
directiv.c directiv.c: correct the parsing of $-symbols in directives, again 2026-06-26 14:11:19 -07:00
directiv.dat directives: correctly handle quoted strings in directives 2025-10-10 10:41:09 -07:00
error.c asm/error.c: handle -w* during command line parsing 2026-07-07 15:43:40 -07:00
eval.c fix memory leak in eval_strfunc 2025-10-06 14:50:40 -07:00
eval.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
exprdump.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
exprlib.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
floats.c Warnings: disaggregate from source and tidy up documentation 2025-10-04 13:46:39 -07:00
floats.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
getbool.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
labels.c asm/labels: fix memory leak in local label structures 2026-06-25 15:13:47 -07:00
listing.c listing.[ch]: allow ! to be used in %pragma and * to reset to cmdline 2026-06-28 20:04:25 -07:00
listing.h listing.[ch]: allow ! to be used in %pragma and * to reset to cmdline 2026-06-28 20:04:25 -07:00
nasm.c files: formalize storing "mapped" file names in the filenames system 2026-07-06 17:08:01 -07:00
parser.c parser: fix invalid segment override on EQU FAR pointers 2026-06-25 15:11:05 -07:00
parser.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pptok.dat treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pptok.pl treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pragma.c labels: make the prefix/suffix options and pragmas consistent 2025-10-07 18:46:39 -07:00
preproc.c Add --debug-prefix-map option 2026-07-04 19:22:48 -07:00
preproc.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
quote.c Add \^ escape sequences for Ctrl characters 2026-04-09 18:08:21 -07:00
quote.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
rdstrnum.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
segalloc.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
srcfile.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
srcfile.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
stdscan.c Warnings: disaggregate from source and tidy up documentation 2025-10-04 13:46:39 -07:00
stdscan.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
strfunc.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
tokens.dat treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
tokhash.pl treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
uncompress.c zlib: pass 15 not 0 to inflateInit2() 2025-11-04 00:38:17 -08:00
warnings.c Make: handle warning files while building in a directory 2023-01-17 13:05:55 -08:00
warnings.dat preproc: warn if the user tries to use %rmacro 2026-06-11 14:29:41 -07:00
warnings.pl error: factor out error functions into separate files 2025-11-07 14:42:33 -08:00