summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorKeith Kanios <keith@kanios.net>2010-12-18 14:08:02 -0600
committerKeith Kanios <keith@kanios.net>2010-12-18 14:08:02 -0600
commit6faad4efe0a68848f10c6b994e14d970d863e0d6 (patch)
treedac850d7b452730e4a8cfb3fba1420c954a0bfcd /preproc.c
parent02e49e048546ae5a4156585ed7de8f0ba89d9395 (diff)
downloadnasm-6faad4efe0a68848f10c6b994e14d970d863e0d6.tar.gz
nasm-6faad4efe0a68848f10c6b994e14d970d863e0d6.tar.bz2
nasm-6faad4efe0a68848f10c6b994e14d970d863e0d6.zip
preproc.c: fix tokenize() warnings for ignored expansion definitions
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/preproc.c b/preproc.c
index 6ac5615..5c56db9 100644
--- a/preproc.c
+++ b/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; */