scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit b00898d90c39c522aa074b10448d6c72c4176683
parent b180e15d2a5fb72ee3aa45a5cf6a3e27a016aed0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 20 Mar 2015 11:51:19 -0400

Remove unneeded variable in generate()

Diffstat:
cc2/cgen.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cc2/cgen.c b/cc2/cgen.c @@ -411,7 +411,7 @@ void generate(void) { extern char odebug; - uint8_t i, size = curfun->u.f.locals; + uint8_t size = curfun->u.f.locals; char frame = size != 0 || odebug; if (frame) { @@ -422,7 +422,7 @@ generate(void) code(ADD, &regs[HL], &regs[SP]); code(MOV, &regs[SP], &regs[HL]); } else { - for (i = size; i != 0; i-= 2) + for (; size != 0; size-= 2) code(PUSH, NULL, &regs[HL]); } }