]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: h8300: fix -Wshadow=local warnings
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Dec 2023 01:10:20 +0000 (20:10 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 23 Dec 2023 04:29:19 +0000 (23:29 -0500)
Delete conflicting decls when the existing scope has vars of the same
name & type for this exact use.

sim/h8300/compile.c

index 8ae7757ee1b10199f5e5581ca0c8476fbc126e75..cfa6eeead5c17b5744cab8c972a197d3f89150a3 100644 (file)
@@ -1738,7 +1738,7 @@ init_pointers (SIM_DESC sd)
 #define OBITOP(name, f, s, op)                         \
 case O (name, SB):                             \
 {                                              \
-  int m, tmp;                                  \
+  int m;                                       \
                                                \
   if (f)                                       \
     if (fetch (sd, &code->dst, &ea))           \
@@ -4770,7 +4770,7 @@ sim_open (SIM_OPEN_KIND kind,
   /* CPU specific initialization.  */
   for (i = 0; i < MAX_NR_PROCESSORS; ++i)
     {
-      SIM_CPU *cpu = STATE_CPU (sd, i);
+      cpu = STATE_CPU (sd, i);
 
       CPU_REG_FETCH (cpu) = h8300_reg_fetch;
       CPU_REG_STORE (cpu) = h8300_reg_store;