Fix some uninitialized values

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 13:55:29 +01:00
parent 18b27d5cf6
commit d69b576d6b

View file

@ -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;
}