public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: m32c: fix declaration-after-statement warnings
@ 2024-01-09  2:24 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2024-01-09  2:24 UTC (permalink / raw)
  To: gdb-patches

---
 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 9e84446d9950..e337acc86333 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;
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-09  2:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09  2:24 [PATCH/committed] sim: m32c: fix declaration-after-statement warnings Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).