Replace nasm_error(ERR_WARNING|...) with nasm_warn()

Remove a few remaining instances of nasm_error(ERR_WARNING).

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2019-08-06 19:18:36 -07:00
parent 959702baa8
commit 873ceee29f
4 changed files with 11 additions and 11 deletions

View file

@ -149,7 +149,7 @@ found_it:
*! warns about a malformed or otherwise unparsable
*! \c{%pragma} directive.
*/
nasm_error(ERR_WARNING|ERR_PASS2|WARN_PRAGMA_BAD,
nasm_warn(ERR_PASS2|WARN_PRAGMA_BAD,
"empty %%pragma %s", pragma->facility_name);
break;
default:
@ -159,7 +159,7 @@ found_it:
*! warns about an unknown \c{%pragma} directive.
*! This is not yet implemented for most cases.
*/
nasm_error(ERR_WARNING|ERR_PASS2|WARN_PRAGMA_UNKNOWN,
nasm_warn(ERR_PASS2|WARN_PRAGMA_UNKNOWN,
"unknown %%pragma %s %s",
pragma->facility_name, pragma->opname);
break;
@ -202,7 +202,7 @@ void process_pragma(char *str)
pragma.facility_name = nasm_get_word(str, &p);
if (!pragma.facility_name) {
nasm_error(ERR_WARNING|ERR_PASS2|WARN_PRAGMA_BAD,
nasm_warn(ERR_PASS2|WARN_PRAGMA_BAD,
"empty pragma directive");
return; /* Empty pragma */
}

View file

@ -169,7 +169,7 @@ int64_t readnum(const char *str, bool *error)
*! covers warnings about numeric constants which
*! don't fit in 64 bits.
*/
nasm_error(ERR_WARNING | WARN_NUMBER_OVERFLOW,
nasm_warn(WARN_NUMBER_OVERFLOW,
"numeric constant %s does not fit in 64 bits",
str);
}

View file

@ -371,7 +371,7 @@ dbg_pragma(const struct pragma *pragma)
errno = 0;
arg = strtoul(pragma->tail, &ep, 0);
if (errno || *nasm_skip_spaces(ep)) {
nasm_error(ERR_WARNING | WARN_PRAGMA_BAD | ERR_PASS2,
nasm_warn(WARN_PRAGMA_BAD | ERR_PASS2,
"invalid %%pragma dbg maxdump argument");
return DIRR_ERROR;
} else {

View file

@ -469,7 +469,7 @@ static int64_t add_reloc(struct section *sect, int32_t section,
break;
case RL_SUB: /* obsolete */
nasm_error(ERR_WARNING|WARN_OTHER, "relcation with subtraction"
nasm_warn(WARN_OTHER, "relcation with subtraction"
"becomes to be obsolete");
r->ext = 0;
r->type = X86_64_RELOC_SUBTRACTOR;
@ -556,7 +556,7 @@ static void macho_output(int32_t secto, const void *data,
s = get_section_by_index(secto);
if (!s) {
nasm_error(ERR_WARNING|WARN_OTHER, "attempt to assemble code in"
nasm_warn(WARN_OTHER, "attempt to assemble code in"
" section %d: defaulting to `.text'", secto);
s = get_section_by_name("__TEXT", "__text");
@ -578,10 +578,10 @@ static void macho_output(int32_t secto, const void *data,
is_bss = (s->flags & SECTION_TYPE) == S_ZEROFILL;
if (is_bss && type != OUT_RESERVE) {
nasm_error(ERR_WARNING|WARN_OTHER, "attempt to initialize memory in "
nasm_warn(WARN_OTHER, "attempt to initialize memory in "
"BSS section: ignored");
/* FIXME */
nasm_error(ERR_WARNING|WARN_OTHER, "section size may be negative"
nasm_warn(WARN_OTHER, "section size may be negative"
"with address symbols");
s->size += realsize(type, size);
return;
@ -592,7 +592,7 @@ static void macho_output(int32_t secto, const void *data,
switch (type) {
case OUT_RESERVE:
if (!is_bss) {
nasm_error(ERR_WARNING|WARN_OTHER, "uninitialized space declared in"
nasm_warn(WARN_OTHER, "uninitialized space declared in"
" %s,%s section: zeroing", s->segname, s->sectname);
sect_write(s, NULL, size);
@ -1651,7 +1651,7 @@ static void macho_write (void)
if (seg_nsects > 0)
offset = macho_write_segment (offset);
else
nasm_error(ERR_WARNING|WARN_OTHER, "no sections?");
nasm_warn(WARN_OTHER, "no sections?");
if (nsyms > 0) {
/* write out symbol command */