diff --git a/Makefile b/Makefile index 9c84efa2..62546d6a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ CFLAGS := -O -g \ -ansi -pedantic \ -Wall -Wextra \ -Wno-variadic-macros \ - -Wno-maybe-uninitialized + -Wno-maybe-uninitialized \ + -Wno-declaration-after-statement include mk/common.mk include mk/arm.mk diff --git a/src/arm-codegen.c b/src/arm-codegen.c index 3c470bf4..49019305 100644 --- a/src/arm-codegen.c +++ b/src/arm-codegen.c @@ -227,7 +227,6 @@ void code_generate() ph2_ir = ph2_ir->next) { int rd = ph2_ir->dest; int rn = ph2_ir->src0; - int rm = ph2_ir->src1; switch (ph2_ir->op) { case OP_load_constant: diff --git a/src/cfront.c b/src/cfront.c index 2211e67b..653577ed 100644 --- a/src/cfront.c +++ b/src/cfront.c @@ -3009,6 +3009,7 @@ basic_block_t *read_body_statement(block_t *parent, basic_block_t *bb) } error("Unrecognized statement token"); + return NULL; } basic_block_t *read_code_block(func_t *func, diff --git a/src/ssa.c b/src/ssa.c index 22ec4506..20c18c1c 100644 --- a/src/ssa.c +++ b/src/ssa.c @@ -185,12 +185,11 @@ int dom_connect(basic_block_t *pred, basic_block_t *succ) if (succ->dom_prev) return 0; - int i, found = 0; + int i; for (i = 0; i < MAX_BB_DOM_SUCC; i++) { - if (pred->dom_next[i] == succ) { - found = 1; + if (pred->dom_next[i] == succ) return 0; - } else if (!pred->dom_next[i]) + if (!pred->dom_next[i]) break; }