[08/15] sim: h8300: fix -Wshadow=local warnings

Message ID 20231222012355.7504-8-vapier@gentoo.org
State New
Headers
Series [01/15] sim: aarch64: fix -Wshadow=local warnings |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Mike Frysinger Dec. 22, 2023, 1:23 a.m. UTC
  Delete conflicting decls when the existing scope has vars of the same
name & type for this exact use.
---
 sim/h8300/compile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 8ae7757ee1b1..cfa6eeead5c1 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -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;