aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-08 20:47:00 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-08 21:24:08 -0500
commit916791c74593099149521b3f3d2af2ec91caa45d (patch)
treedd4df169646de1e66cf81a9a1f138fff7bb8d922 /sim
parentd2704ed59bfa5fcfcc8d5441a837eff5312604a5 (diff)
downloadgdb-916791c74593099149521b3f3d2af2ec91caa45d.zip
gdb-916791c74593099149521b3f3d2af2ec91caa45d.tar.gz
gdb-916791c74593099149521b3f3d2af2ec91caa45d.tar.bz2
sim: m32c: fix declaration-after-statement warnings
Diffstat (limited to 'sim')
-rw-r--r--sim/m32c/opc2c.c5
1 files 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;