[PATCH/committed,14/21] sim: mcore: fix -Wunused-variable warnings

Message ID 20231219105155.10433-14-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,01/21] sim: common: fix -Wunused-variable warnings |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Mike Frysinger Dec. 19, 2023, 10:51 a.m. UTC
  ---
 sim/mcore/interp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 94e0a1675be7..b0c2cc2b3177 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -303,9 +303,8 @@  step_once (SIM_DESC sd, SIM_CPU *cpu)
   int memops;
   int bonus_cycles;
   int insts;
-  int w;
-  int cycs;
 #ifdef WATCHFUNCTIONS
+  int w;
   int32_t WLhash;
 #endif
 
@@ -356,8 +355,8 @@  step_once (SIM_DESC sd, SIM_CPU *cpu)
 
       if ((WLincyc == 1) && (pc == WLendpc))
 	{
-	  cycs = (mcore_cpu->cycles + (insts + bonus_cycles +
-				       (memops * memcycles)) - WLbcyc);
+	  int cycs = (mcore_cpu->cycles + (insts + bonus_cycles +
+					   (memops * memcycles)) - WLbcyc);
 
 	  if (WLcnts[WLW] == 1)
 	    {