aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 20:07:48 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-22 23:29:19 -0500
commitef382e84b759ee3f80383296bc23d1e6277f84ea (patch)
tree15de40b0a3942c835583e741c46cd448712d8828
parent5f347a1106f5ca0924a47e4b1c652092c76abbb1 (diff)
downloadgdb-ef382e84b759ee3f80383296bc23d1e6277f84ea.zip
gdb-ef382e84b759ee3f80383296bc23d1e6277f84ea.tar.gz
gdb-ef382e84b759ee3f80383296bc23d1e6277f84ea.tar.bz2
sim: common: fix -Wshadow=local warnings
Rename shadowed vars with different types, and delete redundant decls.
-rw-r--r--sim/common/sim-fpu.c4
-rw-r--r--sim/common/sim-options.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 491a99b..4ee2672 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 9f23833..c695db6 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)