Fix warnings found by Emscripten 3.1.10

Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
This commit is contained in:
Rémi Verschelde 2022-05-10 12:05:52 +02:00
parent bdbbc78da4
commit 5e693b6d84
11 changed files with 29 additions and 44 deletions

View file

@ -1316,7 +1316,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level, int p_break_addr, int p_continue_addr) {
codegen.push_stack_identifiers();
int new_identifiers = 0;
codegen.current_line = p_block->line;
for (int i = 0; i < p_block->statements.size(); i++) {
@ -1347,7 +1346,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
// copied because there is no _parse_statement :(
codegen.add_stack_identifier(id->name, p_stack_level++);
codegen.alloc_stack(p_stack_level);
new_identifiers++;
GDScriptParser::OperatorNode *op = memnew(GDScriptParser::OperatorNode);
op->op = GDScriptParser::OperatorNode::OP_ASSIGN;
@ -1605,8 +1603,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.add_stack_identifier(lv->name, p_stack_level++);
codegen.alloc_stack(p_stack_level);
new_identifiers++;
} break;
default: {
//expression