From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 12:55:29 +0000 (+0100) Subject: Fix some uninitialized values X-Git-Tag: 0.1.9~282 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d69b576d6b9a8a5c09ca3c5c8f2b262b67b6aa57;p=xonotic%2Fgmqcc.git Fix some uninitialized values --- diff --git a/parser.c b/parser.c index 325df24..1b6cc09 100644 --- a/parser.c +++ b/parser.c @@ -2287,7 +2287,7 @@ static bool parse_block_into(parser_t *parser, ast_block *block, bool warnreturn cleanup: if (!parser_leaveblock(parser)) retval = false; - return !!block; + return retval && !!block; } static ast_block* parse_block(parser_t *parser, bool warnreturn) @@ -3604,7 +3604,7 @@ skipvar: } if (parser->tok == '#') { - ast_function *func; + ast_function *func = NULL; if (localblock) { parseerror(parser, "cannot declare builtins within functions"); @@ -3647,7 +3647,8 @@ skipvar: if (!parser_next(parser)) { parseerror(parser, "expected comma or semicolon"); - ast_function_delete(func); + if (func) + ast_function_delete(func); var->constval.vfunc = NULL; break; }