mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
Fixing uninitialized warnings in parser.c
This commit is contained in:
parent
33c7707f56
commit
f832b86dcd
1 changed files with 5 additions and 5 deletions
10
parser.c
10
parser.c
|
@ -2512,11 +2512,6 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
while (parser->tok != '}') {
|
||||
ast_block *caseblock;
|
||||
|
||||
if (parser->tok != TOKEN_KEYWORD) {
|
||||
ast_delete(switchnode);
|
||||
parseerror(parser, "expected 'case' or 'default'");
|
||||
return false;
|
||||
}
|
||||
if (!strcmp(parser_tokval(parser), "case")) {
|
||||
if (!parser_next(parser)) {
|
||||
ast_delete(switchnode);
|
||||
|
@ -2545,6 +2540,11 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ast_delete(switchnode);
|
||||
parseerror(parser, "expected 'case' or 'default'");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Now the colon and body */
|
||||
if (parser->tok != ':') {
|
||||
|
|
Loading…
Reference in a new issue