aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-20 12:28:05 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-20 12:28:05 -0700
commit68075f8fa638ad7a8b914c32629e9ba4df32f217 (patch)
tree76e80d245db3f19a5339d29000565a6d8a7d1d89
parenta1a844697daabe0e8c493c6abada8049431b7fd2 (diff)
downloadnasm-68075f8fa638ad7a8b914c32629e9ba4df32f217.tar.gz
nasm-68075f8fa638ad7a8b914c32629e9ba4df32f217.tar.xz
nasm-68075f8fa638ad7a8b914c32629e9ba4df32f217.zip
preproc: fix uninitialized variables
Fix uninitialized variables (not just warnings, actual bugs.) Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--asm/preproc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index ce5c41c8..7fc09d8e 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -2315,7 +2315,8 @@ static int parse_smacro_template(Token ***tpp, SMacro *tmpl)
int nparam = 0;
enum sparmflags flags;
struct smac_param *params = NULL;
- bool err, done, greedy;
+ bool err, done;
+ bool greedy = false;
Token **tn = *tpp;
Token *t = *tn;
Token *name;
@@ -2346,7 +2347,7 @@ static int parse_smacro_template(Token ***tpp, SMacro *tmpl)
name = NULL;
flags = 0;
- err = done = greedy = false;
+ err = done = false;
while (!done) {
if (!t || !t->type) {
@@ -4399,6 +4400,8 @@ static Token *expand_mmac_params(Token * tline)
type = TOK_ID;
text = nasm_strdup(mac->iname);
change = true;
+ } else {
+ change = false;
}
break;
@@ -4407,6 +4410,8 @@ static Token *expand_mmac_params(Token * tline)
type = TOK_ID;
text = nasm_strdup(mac->name);
change = true;
+ } else {
+ change = false;
}
break;