mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
errors: simplify nasm_fatal() and nasm_panic()
Nearly all instances of nasm_fatal() and nasm_panic() take a flags argument of zero. Simplify the code by making nasm_fatal and nasm_panic default to no flags, and add an alternate version if flags really are desired. This also means that every call site doesn't have to initialize a zero argument. Furthermore, ERR_NOFILE is now often not necessary, as the error code will no longer cause a null reference if there is no current file. Therefore, we can remove many instances of ERR_NOFILE which only deprives the user of information. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
@@ -480,7 +480,7 @@ static void register_reloc(struct coff_Section *const sect,
|
||||
return;
|
||||
}
|
||||
}
|
||||
nasm_panic(0, "codeview: relocation for unregistered symbol: %s", sym);
|
||||
nasm_panic("codeview: relocation for unregistered symbol: %s", sym);
|
||||
}
|
||||
|
||||
static inline void section_write32(struct coff_Section *sect, uint32_t val)
|
||||
|
Reference in New Issue
Block a user