From: Mike Frysinger Date: Fri, 22 Dec 2023 01:14:34 +0000 (-0500) Subject: sim: sh: fix -Wshadow=local warnings X-Git-Tag: upstream/2.42~399 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62544b0cf1b428fb86f01f56783437bd78f9097c;p=platform%2Fupstream%2Fbinutils.git sim: sh: fix -Wshadow=local warnings Rename the var to avoid shadowing & clobbering the higher context. --- 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;