From 68075f8fa638ad7a8b914c32629e9ba4df32f217 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Tue, 20 Aug 2019 12:28:05 -0700 Subject: preproc: fix uninitialized variables Fix uninitialized variables (not just warnings, actual bugs.) Signed-off-by: H. Peter Anvin (Intel) --- asm/preproc.c | 9 +++++++-- 1 file 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; -- cgit v1.2.1