error: get rid of ERR_PASS1
ERR_PASS1 only remains in three places: a. Unterminated %! string, an error - Should be signalled no matter which pass it is encountered in b. Two cases of map file problems in outbin - The buffered warning system take care of that issue Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
fcb3d135ec
commit
72a555972f
4 changed files with 4 additions and 6 deletions
|
@ -2150,8 +2150,7 @@ static void nasm_issue_error(struct nasm_errtext *et)
|
|||
here = where.filename ? " here" : " in an unknown location";
|
||||
}
|
||||
|
||||
if (warn_list && true_type < ERR_NONFATAL &&
|
||||
!(pass_first() && (severity & ERR_PASS1))) {
|
||||
if (warn_list && true_type < ERR_NONFATAL) {
|
||||
/*
|
||||
* Buffer up warnings until we either get an error
|
||||
* or we are on the code-generation pass.
|
||||
|
|
|
@ -1400,7 +1400,7 @@ static Token *tokenize(const char *line)
|
|||
if (*p)
|
||||
p++;
|
||||
else
|
||||
nasm_nonfatalf(ERR_PASS1, "unterminated %%! string");
|
||||
nasm_nonfatal("unterminated %%! string");
|
||||
} else {
|
||||
/* %! without anything else... */
|
||||
}
|
||||
|
|
|
@ -93,7 +93,6 @@ fatal_func nasm_verror_critical(errflags severity, const char *fmt, va_list ap);
|
|||
#define ERR_NOFILE 0x00000010 /* don't give source file name/line */
|
||||
#define ERR_HERE 0x00000020 /* point to a specific source location */
|
||||
#define ERR_USAGE 0x00000040 /* print a usage message */
|
||||
#define ERR_PASS1 0x00000080 /* message on pass_first */
|
||||
#define ERR_PASS2 0x00000100 /* ignore unless on pass_final */
|
||||
|
||||
#define ERR_NO_SEVERITY 0x00000200 /* suppress printing severity */
|
||||
|
|
|
@ -1326,13 +1326,13 @@ bin_directive(enum directive directive, char *args)
|
|||
else { /* Must be a filename. */
|
||||
rf = nasm_open_write(p, NF_TEXT);
|
||||
if (!rf) {
|
||||
nasm_warn(WARN_OTHER|ERR_PASS1, "unable to open map file `%s'", p);
|
||||
nasm_warn(WARN_OTHER, "unable to open map file `%s'", p);
|
||||
map_control = 0;
|
||||
return DIRR_OK;
|
||||
}
|
||||
}
|
||||
} else
|
||||
nasm_warn(WARN_OTHER|ERR_PASS1, "map file already specified");
|
||||
nasm_warn(WARN_OTHER, "map file already specified");
|
||||
}
|
||||
if (map_control == 0)
|
||||
map_control |= MAP_ORIGIN | MAP_SUMMARY;
|
||||
|
|
Loading…
Reference in a new issue