mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 06:02:22 +00:00
fixed -Wconditional-uninitialized for ast codegen
This commit is contained in:
parent
f4bc6ba08a
commit
2929eb39a8
2 changed files with 13 additions and 14 deletions
1
Makefile
1
Makefile
|
@ -14,7 +14,6 @@ ifeq ($(CC), clang)
|
|||
-Wno-disabled-macro-expansion \
|
||||
-Wno-padded \
|
||||
-Wno-undef \
|
||||
-Wno-conditional-uninitialized \
|
||||
-Wno-format-nonliteral
|
||||
|
||||
endif
|
||||
|
|
26
ast.c
26
ast.c
|
@ -925,31 +925,31 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
|
|||
{
|
||||
ast_expression_codegen *cgen;
|
||||
|
||||
ir_value *dummy;
|
||||
ir_value *precond;
|
||||
ir_value *postcond;
|
||||
ir_value *dummy = NULL;
|
||||
ir_value *precond = NULL;
|
||||
ir_value *postcond = NULL;
|
||||
|
||||
/* Since we insert some jumps "late" so we have blocks
|
||||
* ordered "nicely", we need to keep track of the actual end-blocks
|
||||
* of expressions to add the jumps to.
|
||||
*/
|
||||
ir_block *bbody, *end_bbody;
|
||||
ir_block *bprecond, *end_bprecond;
|
||||
ir_block *bpostcond, *end_bpostcond;
|
||||
ir_block *bincrement, *end_bincrement;
|
||||
ir_block *bout, *bin;
|
||||
ir_block *bbody = NULL, *end_bbody = NULL;
|
||||
ir_block *bprecond = NULL, *end_bprecond = NULL;
|
||||
ir_block *bpostcond = NULL, *end_bpostcond = NULL;
|
||||
ir_block *bincrement = NULL, *end_bincrement = NULL;
|
||||
ir_block *bout = NULL, *bin = NULL;
|
||||
|
||||
/* let's at least move the outgoing block to the end */
|
||||
size_t bout_id;
|
||||
|
||||
/* 'break' and 'continue' need to be able to find the right blocks */
|
||||
ir_block *bcontinue = NULL;
|
||||
ir_block *bbreak = NULL;
|
||||
ir_block *bcontinue = NULL;
|
||||
ir_block *bbreak = NULL;
|
||||
|
||||
ir_block *old_bcontinue;
|
||||
ir_block *old_bbreak;
|
||||
ir_block *old_bcontinue = NULL;
|
||||
ir_block *old_bbreak = NULL;
|
||||
|
||||
ir_block *tmpblock;
|
||||
ir_block *tmpblock = NULL;
|
||||
|
||||
(void)lvalue;
|
||||
(void)out;
|
||||
|
|
Loading…
Reference in a new issue