From: Mike Frysinger Date: Fri, 22 Dec 2023 01:07:48 +0000 (-0500) Subject: sim: common: fix -Wshadow=local warnings X-Git-Tag: binutils-2_42~411 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef382e84b759ee3f80383296bc23d1e6277f84ea;p=thirdparty%2Fbinutils-gdb.git sim: common: fix -Wshadow=local warnings Rename shadowed vars with different types, and delete redundant decls. --- diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index 491a99b7212..4ee26723ee2 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -413,9 +413,9 @@ unpack_fpu (sim_fpu *dst, uint64_t packed, int is_double) } else { - uint32_t val = pack_fpu (dst, 0); + uint32_t fval = pack_fpu (dst, 0); uint32_t org = packed; - ASSERT (val == org); + ASSERT (fval == org); } } } diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 9f238339fb8..c695db687cb 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -496,7 +496,7 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, case OPTION_ENV_UNSET: { - int i, varlen; + int varlen; char **envp; if (STATE_PROG_ENVP (sd) == NULL)