From 29074d769d29fcc08a80a93a7bef7fa080ff1edb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marvin=20Ha=CC=88user?= <mhaeuser@posteo.de>
Date: Sat, 25 Nov 2023 16:14:14 +0100
Subject: [PATCH] simulator: remove unused variables

---
 simulators/c++2/src_simulator/arch/FPGA.cpp              | 2 +-
 simulators/c++2/src_simulator/arch/OrderScheduler.cpp    | 2 +-
 simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp | 4 ++--
 simulators/c++2/src_simulator/sim/ServerHelp.cpp         | 2 --
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/simulators/c++2/src_simulator/arch/FPGA.cpp b/simulators/c++2/src_simulator/arch/FPGA.cpp
index ae8cdcece0..b2a4965cc6 100644
--- a/simulators/c++2/src_simulator/arch/FPGA.cpp
+++ b/simulators/c++2/src_simulator/arch/FPGA.cpp
@@ -1272,7 +1272,7 @@ void FPGA::schedule2HTML(std::ofstream &myfile)
         unsigned int aLength = aCurrTrans->getOperationLength();
 
         // Issue #4
-        TMLTask *task = aCurrTrans->getCommand()->getTask();
+        //  TMLTask *task = aCurrTrans->getCommand()->getTask();
         //	std::cout<<"what is this task?"<<task->toString()<<std::endl;
         const std::string cellClass = determineHTMLCellClass(nextCellClassIndex);
         if (!(!(aCurrTrans->getCommand()->getActiveDelay()) && aCurrTrans->getCommand()->isDelayTransaction()))
diff --git a/simulators/c++2/src_simulator/arch/OrderScheduler.cpp b/simulators/c++2/src_simulator/arch/OrderScheduler.cpp
index c2e3a67f89..e5148f1d4e 100644
--- a/simulators/c++2/src_simulator/arch/OrderScheduler.cpp
+++ b/simulators/c++2/src_simulator/arch/OrderScheduler.cpp
@@ -51,7 +51,7 @@ TMLTime OrderScheduler::schedule(TMLTime iEndSchedule){
 	TaskList::iterator i;
 
     //std::cout << _name << ": Schedule called \n";
-    TMLTransaction *anOldTransaction = _nextTransaction, *aTempTrans;
+    TMLTransaction *aTempTrans;
     TMLTime aLowestRunnableTimeFuture=-1, aRunnableTime, aLowestRunnableTimePast=-1;
     WorkloadSource *aSourcePast=0, *aSourceFuture=0;
         //std::cout << _name << ": Second if\n";
diff --git a/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp b/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp
index bb9f721688..85ffe77eeb 100644
--- a/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp
+++ b/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp
@@ -49,9 +49,9 @@ ReconfigScheduler::ReconfigScheduler(const std::string& iName, Priority iPrio, W
 TMLTime ReconfigScheduler::schedule(TMLTime iEndSchedule){
   std::cout<<"reconfig scheduler"<<std::endl;
 	TaskList::iterator i;
-	TMLTransaction *aMarkerPast=0, *aMarkerFuture=0,*aTempTrans;
+	TMLTransaction *aMarkerPast=0, *aTempTrans;
 	TMLTask* aTempTask;
-	TMLTime aTransTimeFuture=-1,aRunnableTime,aLowestRunnableTimePast=-1;;
+	TMLTime aRunnableTime,aLowestRunnableTimePast=-1;;
 	WorkloadSource *aSourcePast=0, *aSourceFuture=0;  //NEW
 	std::vector<std::string> getTaskOrder;
     std::string _tempTaskOrder, taskOrderCopy;
diff --git a/simulators/c++2/src_simulator/sim/ServerHelp.cpp b/simulators/c++2/src_simulator/sim/ServerHelp.cpp
index bc95e02cd8..62edc88c32 100644
--- a/simulators/c++2/src_simulator/sim/ServerHelp.cpp
+++ b/simulators/c++2/src_simulator/sim/ServerHelp.cpp
@@ -95,12 +95,10 @@ void ServerHelp::parseHtml(std::string filePath) {
     std::string searchEnd = "</tr>";
     std::string delimiter = "</td>";
 //    std::string breakLine = "<br />";
-    unsigned int curLine = 0;
 
     std::istringstream data(filePath.c_str());
 
     while(std::getline(data, line)) {
-        curLine++;
         if (line.find(searchStart1, 0) != std::string::npos || line.find(searchStart2, 0) != std::string::npos) {
             check = true;
             continue;
-- 
GitLab