From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: m32c: fix declaration-after-statement warnings
Date: Mon, 8 Jan 2024 21:24:22 -0500 [thread overview]
Message-ID: <20240109022423.32322-1-vapier@gentoo.org> (raw)
---
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
reply other threads:[~2024-01-09 2:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240109022423.32322-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).