aboutsummaryrefslogtreecommitdiff
path: root/sim/mcore
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-15 22:20:48 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-19 05:51:10 -0500
commit2705c08342f6c8f30a4b7439e7352871ce0bc427 (patch)
treeac144b6996043be9acc64e6e67301cc5a03a0efd /sim/mcore
parent568b2f90c7d5c1ecb6bfea7963c4dd744cad80bb (diff)
downloadgdb-2705c08342f6c8f30a4b7439e7352871ce0bc427.zip
gdb-2705c08342f6c8f30a4b7439e7352871ce0bc427.tar.gz
gdb-2705c08342f6c8f30a4b7439e7352871ce0bc427.tar.bz2
sim: mcore: fix -Wunused-variable warnings
Diffstat (limited to 'sim/mcore')
-rw-r--r--sim/mcore/interp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 94e0a16..b0c2cc2 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)
{