From d2e5bd36ded4d4a6f218eb5a9f4668e4943d4555 Mon Sep 17 00:00:00 2001 From: Derek Christ Date: Fri, 22 Sep 2023 10:45:23 +0200 Subject: [PATCH] Fix all warnings --- .../businessObjects/commentmodel.cpp | 2 +- .../common/timedependency.h | 4 ++-- .../configurations/configurationBase.cpp | 4 ++-- .../configurations/configurationBase.h | 4 ++-- .../configurations/configurationfactory.cpp | 1 - .../dbEntries/dbphaseentryBase.h | 4 ++-- .../dramtimedependenciesbase.cpp | 2 +- .../dramtimedependenciesbase.h | 2 +- .../phasedependenciestracker.cpp | 2 -- .../businessObjects/phases/phase.cpp | 1 - .../businessObjects/phases/phase.h | 4 ++-- .../businessObjects/phases/phasedependency.cpp | 10 +++++----- .../traceAnalyzer/businessObjects/transaction.h | 2 +- extensions/apps/traceAnalyzer/main.cpp | 10 +--------- .../selectedtransactiontreewidget.cpp | 6 +++--- .../presentation/tracedrawingproperties.cpp | 2 -- .../presentation/tracenavigator.cpp | 2 +- .../traceAnalyzer/presentation/traceplot.cpp | 4 ++-- .../presentation/tracescroller.cpp | 2 ++ .../presentation/util/customlabelscaledraw.cpp | 4 ++-- extensions/apps/traceAnalyzer/traceanalyzer.cpp | 12 ++++++------ extensions/apps/traceAnalyzer/traceanalyzer.h | 13 +------------ extensions/apps/traceAnalyzer/tracefiletab.cpp | 17 ++++++++--------- extensions/apps/traceAnalyzer/tracefiletab.h | 2 +- .../DRAMSys/simulation/AddressDecoder.cpp | 2 +- 25 files changed, 47 insertions(+), 71 deletions(-) diff --git a/extensions/apps/traceAnalyzer/businessObjects/commentmodel.cpp b/extensions/apps/traceAnalyzer/businessObjects/commentmodel.cpp index 71dc469d..01fa18f8 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/commentmodel.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/commentmodel.cpp @@ -277,7 +277,7 @@ const std::vector& CommentModel::getComments() const traceTime CommentModel::getTimeFromIndex(const QModelIndex& index) const { - Q_ASSERT(comments.size() > index.row()); + Q_ASSERT(index.row() > 0 && comments.size() > static_cast(index.row())); return comments[index.row()].time; } diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/common/timedependency.h b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/common/timedependency.h index bfd22b47..47b90eef 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/common/timedependency.h +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/common/timedependency.h @@ -42,8 +42,8 @@ class DBPhaseEntryBase; #define PASSFUNCTIONDECL \ - (const std::shared_ptr thisPhase, \ - const std::shared_ptr otherPhase) + ([[maybe_unused]] const std::shared_ptr thisPhase, \ + [[maybe_unused]] const std::shared_ptr otherPhase) struct PassFunction { using Fn = std::function; diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.cpp b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.cpp index 4a9f3f4b..d1f8bc4f 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.cpp @@ -35,7 +35,7 @@ #include "configurationBase.h" -const uint ConfigurationBase::getClk() const +uint ConfigurationBase::getClk() const { if (!mDeviceDeps) throw std::invalid_argument( @@ -67,7 +67,7 @@ const QString ConfigurationBase::getDeviceName(const TraceDB& tdb) return mGetMemspec(tdb)["memoryType"].toString(); } -const uint ConfigurationBase::mGetClk(const TraceDB& tdb) +uint ConfigurationBase::mGetClk(const TraceDB& tdb) { QSqlDatabase db = tdb.getDatabase(); QString query = "SELECT clk FROM GeneralInfo"; diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.h b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.h index 73703001..0ba065fe 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.h +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationBase.h @@ -50,7 +50,7 @@ public: virtual std::shared_ptr makePhaseEntry(const QSqlQuery&) const = 0; // Delegated methods - const uint getClk() const; + uint getClk() const; DependencyMap getDependencies(std::vector& commands) const; PoolControllerMap getPools() const; @@ -59,7 +59,7 @@ public: protected: std::shared_ptr mDeviceDeps = nullptr; - static const uint mGetClk(const TraceDB& tdb); + static uint mGetClk(const TraceDB& tdb); static const QJsonObject mGetMemspec(const TraceDB& tdb); QSqlQuery mExecuteQuery(const QString& queryStr); diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp index 1cb0d6e2..2b5e2862 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp @@ -111,7 +111,6 @@ const std::vector ConfigurationFactory::possiblePhases(const TraceDB& t bool ConfigurationFactory::deviceSupported(const TraceDB& tdb) { - uint clk; // Not used const QString deviceName = ConfigurationBase::getDeviceName(tdb); if (deviceName == "DDR3") diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h index 4a153eb5..8063958e 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h @@ -46,8 +46,8 @@ public: DBPhaseEntryBase() = default; virtual ~DBPhaseEntryBase() = default; - virtual bool potentialDependency(const TimeDependency& dep, - const std::shared_ptr otherPhase) + virtual bool potentialDependency([[maybe_unused]] const TimeDependency& dep, + [[maybe_unused]] const std::shared_ptr otherPhase) { return false; } diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp index 8fa2c438..74f1dbd3 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp @@ -94,7 +94,7 @@ void DRAMTimeDependenciesBase::mFilterDependencyList( [](const StringMapper& cmd, const StringMapper& depName) { return depName.isPool() || cmd < depName; }); - if (dep.phaseDep.isPool() || it != dependencyFilter.end() && *it == dep.phaseDep) + if (dep.phaseDep.isPool() || (it != dependencyFilter.end() && *it == dep.phaseDep)) return true; return false; diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h index f3edc13d..22e11120 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h @@ -47,7 +47,7 @@ public: DependencyMap getDependencies(std::vector& dependencyFilter) const; - const uint getClk() const { return tCK; } + uint getClk() const { return tCK; } PoolControllerMap getPools() const; diff --git a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/phasedependenciestracker.cpp b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/phasedependenciestracker.cpp index 93ddceab..e0904049 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/phasedependenciestracker.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/dramTimeDependencies/phasedependenciestracker.cpp @@ -129,8 +129,6 @@ void PhaseDependenciesTracker::mInsertIntoTable(TraceDB& tdb, { static const size_t bulkInsertionSize = 30; - auto numberOfEntries = entries.size(); - QString command; size_t counter = 0; for (const auto& entry : entries) diff --git a/extensions/apps/traceAnalyzer/businessObjects/phases/phase.cpp b/extensions/apps/traceAnalyzer/businessObjects/phases/phase.cpp index 0f229ef6..90ab213e 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/phases/phase.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/phases/phase.cpp @@ -219,7 +219,6 @@ void Phase::drawPhaseDependencies(traceTime begin, for (const auto& dep : mDependencies) { - bool visible = false; if (dep->isVisible()) { if (!dep->draw(depLineTo, drawingProperties, painter, xMap, yMap)) diff --git a/extensions/apps/traceAnalyzer/businessObjects/phases/phase.h b/extensions/apps/traceAnalyzer/businessObjects/phases/phase.h index 4d3756b3..18d2e75d 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/phases/phase.h +++ b/extensions/apps/traceAnalyzer/businessObjects/phases/phase.h @@ -100,11 +100,11 @@ public: row(row), column(column), burstLength(burstLength), + groupsPerRank(groupsPerRank), + banksPerGroup(banksPerGroup), clk(clk), transaction(transaction), spansOnCommandBus(std::move(spansOnCommandBus)), - groupsPerRank(groupsPerRank), - banksPerGroup(banksPerGroup), hexagonHeight(0.6), captionPosition(TextPositioning::bottomRight) { diff --git a/extensions/apps/traceAnalyzer/businessObjects/phases/phasedependency.cpp b/extensions/apps/traceAnalyzer/businessObjects/phases/phasedependency.cpp index 190cb3c2..1ea46971 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/phases/phasedependency.cpp +++ b/extensions/apps/traceAnalyzer/businessObjects/phases/phasedependency.cpp @@ -67,7 +67,7 @@ bool PhaseDependency::draw(QPoint& end, if (mIsInvisible) return false; - traceTime depBegin = mDependency->span.Begin(); + // traceTime depBegin = mDependency->span.Begin(); traceTime depEnd = mDependency->span.End(); if (xMap.transform(depEnd) < 0) @@ -91,13 +91,13 @@ void PhaseDependency::mDraw(QPoint& end, const QwtScaleMap& yMap) { traceTime depBegin = mDependency->span.Begin(); - traceTime depEnd = mDependency->span.End(); + // traceTime depEnd = mDependency->span.End(); - traceTime depOffset = - (depBegin == depEnd) ? static_cast(0.05 * mDependency->clk) : 0; + // traceTime depOffset = + // (depBegin == depEnd) ? static_cast(0.05 * mDependency->clk) : 0; double depYVal = yMap.transform(depY); - double depSymbolHeight = yMap.transform(0) - yMap.transform(mDependency->hexagonHeight); + // double depSymbolHeight = yMap.transform(0) - yMap.transform(mDependency->hexagonHeight); QPoint depLineFrom( static_cast(xMap.transform(depBegin /* + (depEnd + depOffset - depBegin)/4*/)), static_cast(depYVal)); diff --git a/extensions/apps/traceAnalyzer/businessObjects/transaction.h b/extensions/apps/traceAnalyzer/businessObjects/transaction.h index 0c99c6f6..c4f0c392 100644 --- a/extensions/apps/traceAnalyzer/businessObjects/transaction.h +++ b/extensions/apps/traceAnalyzer/businessObjects/transaction.h @@ -87,7 +87,7 @@ public: { mSNumTransactions = numTransactions; } - static unsigned int getNumTransactions(const unsigned int numTransactions) + static unsigned int getNumTransactions() { return mSNumTransactions; } diff --git a/extensions/apps/traceAnalyzer/main.cpp b/extensions/apps/traceAnalyzer/main.cpp index 8b9627f2..1a280f84 100644 --- a/extensions/apps/traceAnalyzer/main.cpp +++ b/extensions/apps/traceAnalyzer/main.cpp @@ -72,14 +72,6 @@ int main(int argc, char* argv[]) for (int i = 1; i < argc; ++i) arguments.insert(QString(argv[i])); - StartupOption startupOption = StartupOption::showPlots; - QString testflag("-t"); - if (arguments.contains(testflag)) - { - startupOption = StartupOption::runTests; - arguments.remove(testflag); - } - QString openFolderFlag("-f"); if (arguments.contains(openFolderFlag)) { @@ -98,7 +90,7 @@ int main(int argc, char* argv[]) } } - TraceAnalyzer analyzer(arguments, startupOption); + TraceAnalyzer analyzer(arguments); analyzer.show(); return a.exec(); } diff --git a/extensions/apps/traceAnalyzer/presentation/selectedtransactiontreewidget.cpp b/extensions/apps/traceAnalyzer/presentation/selectedtransactiontreewidget.cpp index d1e53edd..88e3c88c 100644 --- a/extensions/apps/traceAnalyzer/presentation/selectedtransactiontreewidget.cpp +++ b/extensions/apps/traceAnalyzer/presentation/selectedtransactiontreewidget.cpp @@ -46,16 +46,16 @@ void SelectedTransactionTreeWidget::selectedTransactionsChanged() } expandAll(); - for (size_t k = 0; k < topLevelItemCount(); k++) + for (int k = 0; k < topLevelItemCount(); k++) { auto node = topLevelItem(k); - for (size_t i = 0; i < node->childCount(); i++) + for (int i = 0; i < node->childCount(); i++) { if (node->child(i)->text(0) == "Phases") { auto phaseNode = node->child(i); - for (size_t j = 0; j < phaseNode->childCount(); j++) + for (int j = 0; j < phaseNode->childCount(); j++) phaseNode->child(j)->setExpanded(false); } } diff --git a/extensions/apps/traceAnalyzer/presentation/tracedrawingproperties.cpp b/extensions/apps/traceAnalyzer/presentation/tracedrawingproperties.cpp index 04588d82..255d1125 100644 --- a/extensions/apps/traceAnalyzer/presentation/tracedrawingproperties.cpp +++ b/extensions/apps/traceAnalyzer/presentation/tracedrawingproperties.cpp @@ -64,8 +64,6 @@ void TraceDrawingProperties::updateLabels() // The lowest line starts at the y value of 0. int yVal = 0; - auto selectedModel = tracePlotLineDataSource->getSelectedModel(); - for (auto it = tracePlotLineDataSource->getTracePlotLines().rbegin(); it != tracePlotLineDataSource->getTracePlotLines().rend(); ++it) diff --git a/extensions/apps/traceAnalyzer/presentation/tracenavigator.cpp b/extensions/apps/traceAnalyzer/presentation/tracenavigator.cpp index a4394de2..d7aacd1b 100644 --- a/extensions/apps/traceAnalyzer/presentation/tracenavigator.cpp +++ b/extensions/apps/traceAnalyzer/presentation/tracenavigator.cpp @@ -120,7 +120,7 @@ void TraceNavigator::refreshData() void TraceNavigator::addSelectedTransactions(const vector>& transactions) { - for (const auto transaction : transactions) + for (const auto &transaction : transactions) { selectedTransactions.push_back(transaction); } diff --git a/extensions/apps/traceAnalyzer/presentation/traceplot.cpp b/extensions/apps/traceAnalyzer/presentation/traceplot.cpp index bc70ca8b..4f612ae5 100644 --- a/extensions/apps/traceAnalyzer/presentation/traceplot.cpp +++ b/extensions/apps/traceAnalyzer/presentation/traceplot.cpp @@ -465,7 +465,7 @@ ToggleCollapsedAction::CollapsedState TracePlot::getCollapsedState() const auto selectedModel = tracePlotLineDataSource->getSelectedModel(); - for (unsigned int i = 0; i < selectedModel->rowCount(); i++) + for (int i = 0; i < selectedModel->rowCount(); i++) { QModelIndex index = selectedModel->index(i, 0); auto type = static_cast( @@ -496,7 +496,7 @@ void TracePlot::collapseOrExpandAllRanks(ToggleCollapsedAction::CollapseAction c using CollapseAction = ToggleCollapsedAction::CollapseAction; auto selectedModel = tracePlotLineDataSource->getSelectedModel(); - for (unsigned int i = 0; i < selectedModel->rowCount(); i++) + for (int i = 0; i < selectedModel->rowCount(); i++) { QModelIndex index = selectedModel->index(i, 0); auto type = static_cast( diff --git a/extensions/apps/traceAnalyzer/presentation/tracescroller.cpp b/extensions/apps/traceAnalyzer/presentation/tracescroller.cpp index 5bed584e..e3c007e0 100644 --- a/extensions/apps/traceAnalyzer/presentation/tracescroller.cpp +++ b/extensions/apps/traceAnalyzer/presentation/tracescroller.cpp @@ -294,6 +294,7 @@ bool TraceScroller::eventFilter(QObject* object, QEvent* event) static_cast(invTransform(xBottom, mouseEvent->x()))); return true; } + break; } case QEvent::MouseButtonRelease: { @@ -305,6 +306,7 @@ bool TraceScroller::eventFilter(QObject* object, QEvent* event) canvas()->setCursor(Qt::ArrowCursor); return true; } + break; } case QEvent::MouseMove: { diff --git a/extensions/apps/traceAnalyzer/presentation/util/customlabelscaledraw.cpp b/extensions/apps/traceAnalyzer/presentation/util/customlabelscaledraw.cpp index 27557492..7e94f9ec 100644 --- a/extensions/apps/traceAnalyzer/presentation/util/customlabelscaledraw.cpp +++ b/extensions/apps/traceAnalyzer/presentation/util/customlabelscaledraw.cpp @@ -36,8 +36,8 @@ #include "customlabelscaledraw.h" CustomLabelScaleDraw::CustomLabelScaleDraw(std::shared_ptr> labels) : - labels(labels), - QObject(nullptr) + QObject(nullptr), + labels(labels) { } diff --git a/extensions/apps/traceAnalyzer/traceanalyzer.cpp b/extensions/apps/traceAnalyzer/traceanalyzer.cpp index 835ee0ca..9169643d 100644 --- a/extensions/apps/traceAnalyzer/traceanalyzer.cpp +++ b/extensions/apps/traceAnalyzer/traceanalyzer.cpp @@ -62,16 +62,16 @@ void TraceAnalyzer::setUpGui() TraceAnalyzer::TraceAnalyzer(QWidget* parent) : QMainWindow(parent), - ui(new Ui::TraceAnalyzer), - evaluationTool(pythonCaller) + evaluationTool(pythonCaller), + ui(new Ui::TraceAnalyzer) { setUpGui(); } -TraceAnalyzer::TraceAnalyzer(QSet paths, StartupOption option, QWidget* parent) : +TraceAnalyzer::TraceAnalyzer(QSet paths, QWidget* parent) : QMainWindow(parent), - ui(new Ui::TraceAnalyzer), - evaluationTool(pythonCaller) + evaluationTool(pythonCaller), + ui(new Ui::TraceAnalyzer) { setUpGui(); @@ -262,7 +262,7 @@ void TraceAnalyzer::on_actionAbout_triggered() void TraceAnalyzer::closeEvent(QCloseEvent* event) { - for (unsigned int i = 0; i < ui->traceFileTabs->count(); i++) + for (int i = 0; i < ui->traceFileTabs->count(); i++) { QWidget* tab = ui->traceFileTabs->widget(i); if (!tab->close()) diff --git a/extensions/apps/traceAnalyzer/traceanalyzer.h b/extensions/apps/traceAnalyzer/traceanalyzer.h index 91c8797d..c7b1d1d6 100644 --- a/extensions/apps/traceAnalyzer/traceanalyzer.h +++ b/extensions/apps/traceAnalyzer/traceanalyzer.h @@ -51,17 +51,6 @@ namespace Ui class TraceAnalyzer; } -enum class StartupOption -{ - showPlots, - runTests -}; -enum class OpenOptions -{ - files, - folders -}; - class TraceFileTab; class TraceAnalyzer : public QMainWindow @@ -70,7 +59,7 @@ class TraceAnalyzer : public QMainWindow public: explicit TraceAnalyzer(QWidget* parent = nullptr); - explicit TraceAnalyzer(QSet paths, StartupOption option, QWidget* parent = nullptr); + explicit TraceAnalyzer(QSet paths, QWidget* parent = nullptr); ~TraceAnalyzer(); void setUpStatusBar(); diff --git a/extensions/apps/traceAnalyzer/tracefiletab.cpp b/extensions/apps/traceAnalyzer/tracefiletab.cpp index acb8488d..177ec65d 100644 --- a/extensions/apps/traceAnalyzer/tracefiletab.cpp +++ b/extensions/apps/traceAnalyzer/tracefiletab.cpp @@ -61,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -74,6 +73,7 @@ TraceFileTab::TraceFileTab(std::string_view traceFilePath, PythonCaller& pythonCaller, QWidget* parent) : QWidget(parent), + traceFilePath(traceFilePath), ui(new Ui::TraceFileTab), commentModel(new CommentModel(this)), navigator(new TraceNavigator(traceFilePath.data(), commentModel, this)), @@ -83,9 +83,8 @@ TraceFileTab::TraceFileTab(std::string_view traceFilePath, selectedRowsModel(new SelectedTracePlotLineModel(navigator->GeneralTraceInfo(), this)), tracePlotLineDataSource(new TracePlotLineDataSource(selectedRowsModel, this)), depInfosView(new DependencyInfosModel(navigator->TraceFile(), this)), - savingChangesToDB(false), pythonCaller(pythonCaller), - traceFilePath(traceFilePath) + savingChangesToDB(false) { ui->setupUi(this); @@ -101,7 +100,7 @@ TraceFileTab::TraceFileTab(std::string_view traceFilePath, ui->depInfosView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); setUpTraceSelector(); - initNavigatorAndItsDependentWidgets(traceFilePath.data()); + initNavigatorAndItsDependentWidgets(); setUpFileWatcher(traceFilePath.data()); setUpTraceplotScrollbar(); setUpCommentView(); @@ -181,7 +180,7 @@ void TraceFileTab::setUpTraceplotScrollbar() SLOT(verticalScrollbarChanged(int))); } -void TraceFileTab::initNavigatorAndItsDependentWidgets(QString path) +void TraceFileTab::initNavigatorAndItsDependentWidgets() { ui->traceplot->init(navigator, ui->traceplotScrollbar, tracePlotLineDataSource, commentModel); @@ -567,10 +566,10 @@ void TraceFileTab::on_startPowerAnalysis_clicked() ui->bandwidthPlot->replot(); // Buffer analysis: - sql = "select max(BufferNumber) from BufferDepth;"; - query.exec(sql); - query.next(); - unsigned int numberOfBuffers = query.value(0).toUInt(); + // sql = "select max(BufferNumber) from BufferDepth;"; + // query.exec(sql); + // query.next(); + // unsigned int numberOfBuffers = query.value(0).toUInt(); sql = "select MaxBufferDepth from GeneralInfo;"; query.exec(sql); diff --git a/extensions/apps/traceAnalyzer/tracefiletab.h b/extensions/apps/traceAnalyzer/tracefiletab.h index ff8e390e..ceedf62f 100644 --- a/extensions/apps/traceAnalyzer/tracefiletab.h +++ b/extensions/apps/traceAnalyzer/tracefiletab.h @@ -78,7 +78,7 @@ public: void setUpTraceSelector(); void setUpPossiblePhases(); - void initNavigatorAndItsDependentWidgets(QString path); + void initNavigatorAndItsDependentWidgets(); QString getPathToTraceFile() { return traceFilePath.data(); } void commitChangesToDB(void); void exportAsVCD(); diff --git a/src/libdramsys/DRAMSys/simulation/AddressDecoder.cpp b/src/libdramsys/DRAMSys/simulation/AddressDecoder.cpp index 792d4f9d..12bc61bb 100644 --- a/src/libdramsys/DRAMSys/simulation/AddressDecoder.cpp +++ b/src/libdramsys/DRAMSys/simulation/AddressDecoder.cpp @@ -131,7 +131,7 @@ AddressDecoder::AddressDecoder(const DRAMSys::Config::AddressMapping& addressMap { highestByteBit = static_cast(*std::max_element(vByteBits.begin(), vByteBits.end())); - for (unsigned bitPosition = 0; bitPosition <= highestByteBit; bitPosition++) + for (unsigned bitPosition = 0; bitPosition <= static_cast(highestByteBit); bitPosition++) { if (std::find(vByteBits.begin(), vByteBits.end(), bitPosition) == vByteBits.end()) SC_REPORT_FATAL("AddressDecoder", "Byte bits are not continuous starting from 0");