sim: sh: fix -Wshadow=local warnings

Rename the var to avoid shadowing & clobbering the higher context.
This commit is contained in:
Mike Frysinger 2023-12-21 20:14:34 -05:00
parent f0fcc327e3
commit 62544b0cf1

View File

@ -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;