public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: sh: fix -Wshadow=local warnings
@ 2023-12-23 4:32 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-12-23 4:32 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=62544b0cf1b428fb86f01f56783437bd78f9097c
commit 62544b0cf1b428fb86f01f56783437bd78f9097c
Author: Mike Frysinger <vapier@gentoo.org>
Date: Thu Dec 21 20:14:34 2023 -0500
sim: sh: fix -Wshadow=local warnings
Rename the var to avoid shadowing & clobbering the higher context.
Diff:
---
sim/sh/interp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 01d7a1c7be9..bbf26bb1189 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -1046,8 +1046,8 @@ trap (SIM_DESC sd, int i, int *regs, unsigned char *insn_ptr,
if (regs[5] < countargv (prog_argv))
{
/* Include the termination byte. */
- int i = strlen (prog_argv[regs[5]]) + 1;
- regs[0] = sim_write (0, regs[6], prog_argv[regs[5]], i);
+ int len = strlen (prog_argv[regs[5]]) + 1;
+ regs[0] = sim_write (0, regs[6], prog_argv[regs[5]], len);
}
else
regs[0] = -1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-23 4:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-23 4:32 [binutils-gdb] sim: sh: fix -Wshadow=local warnings Michael 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).