From 916791c74593099149521b3f3d2af2ec91caa45d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 8 Jan 2024 20:47:00 -0500 Subject: sim: m32c: fix declaration-after-statement warnings --- sim/m32c/opc2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c index 9e84446..e337acc 100644 --- a/sim/m32c/opc2c.c +++ b/sim/m32c/opc2c.c @@ -136,10 +136,11 @@ valid_varybits (int bits, opcode * op, int byte) int found = 0; int i; int ob; + Vary *v; if (byte != op->vary[vn].byte) continue; - Vary *v = vary[op->vary[vn].varyno]; + v = vary[op->vary[vn].varyno]; ob = (bits >> op->vary[vn].shift) & v->mask; lprintf (sim_log, "varybits: vary %s ob %x\n", v->name, ob); @@ -163,10 +164,10 @@ prmb (int mask, int bits) static char buf[8][30]; static int bn = 0; char *bp; + int i; bn = (bn + 1) % 8; bp = buf[bn]; - int i; for (i = 0; i < 8; i++) { int bit = 0x80 >> i; -- cgit v1.1