sim: common: fix -Wshadow=local warnings
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Dec 2023 01:07:48 +0000 (20:07 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 23 Dec 2023 04:29:19 +0000 (23:29 -0500)
Rename shadowed vars with different types, and delete redundant decls.

sim/common/sim-fpu.c
sim/common/sim-options.c

index 491a99b..4ee2672 100644 (file)
@@ -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);
       }
   }
 }
index 9f23833..c695db6 100644 (file)
@@ -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)