aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 20:14:34 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-22 23:29:19 -0500
commit62544b0cf1b428fb86f01f56783437bd78f9097c (patch)
tree043851c5602a3ae68d59e1f838f8808c1605c68c
parentf0fcc327e33341648b7cec9526e1cbd2489b5330 (diff)
downloadgdb-62544b0cf1b428fb86f01f56783437bd78f9097c.zip
gdb-62544b0cf1b428fb86f01f56783437bd78f9097c.tar.gz
gdb-62544b0cf1b428fb86f01f56783437bd78f9097c.tar.bz2
sim: sh: fix -Wshadow=local warnings
Rename the var to avoid shadowing & clobbering the higher context.
-rw-r--r--sim/sh/interp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 01d7a1c..bbf26bb 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;