mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-18 18:50:23 +08:00
preproc.c: fix tokenize() warnings for ignored expansion definitions
This commit is contained in:
parent
02e49e0485
commit
6faad4efe0
11
preproc.c
11
preproc.c
@ -935,6 +935,11 @@ static Token *tokenize(char *line)
|
||||
enum pp_token_type type;
|
||||
Token *list = NULL;
|
||||
Token *t, **tail = &list;
|
||||
bool verbose = true;
|
||||
|
||||
if ((defining != NULL) && (defining->ignoring == true)) {
|
||||
verbose = false;
|
||||
}
|
||||
|
||||
while (*line) {
|
||||
p = line;
|
||||
@ -985,7 +990,7 @@ static Token *tokenize(char *line)
|
||||
p--;
|
||||
if (*p)
|
||||
*p++ = '\0';
|
||||
if (lvl && !defining)
|
||||
if (lvl && verbose)
|
||||
error(ERR_NONFATAL, "unterminated %[ construct");
|
||||
type = TOK_INDIRECT;
|
||||
} else if (*p == '?') {
|
||||
@ -1006,7 +1011,7 @@ static Token *tokenize(char *line)
|
||||
p = nasm_skip_string(p);
|
||||
if (*p)
|
||||
p++;
|
||||
else if(!defining)
|
||||
else if(verbose)
|
||||
error(ERR_NONFATAL|ERR_PASS1, "unterminated %! string");
|
||||
} else {
|
||||
/* %! without string or identifier */
|
||||
@ -1039,7 +1044,7 @@ static Token *tokenize(char *line)
|
||||
|
||||
if (*p) {
|
||||
p++;
|
||||
} else if(!defining) {
|
||||
} else if(verbose) {
|
||||
error(ERR_WARNING|ERR_PASS1, "unterminated string");
|
||||
/* Handling unterminated strings by UNV */
|
||||
/* type = -1; */
|
||||
|
Loading…
x
Reference in New Issue
Block a user