mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-04-10 20:14:32 +00:00
Fix some uninitialized values
This commit is contained in:
parent
18b27d5cf6
commit
d69b576d6b
1 changed files with 4 additions and 3 deletions
7
parser.c
7
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue