Skip to content

Commit 6897746

Browse files
committed
mitigated functionStatic and functionConst selfcheck warnings
1 parent 9a6c71e commit 6897746

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

gui/test/projectfile/testprojectfile.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ void TestProjectFile::getCheckingSuppressionsStar() const
199199
QCOMPARE(projectFile.getCheckingSuppressions()[0].fileName, "*.cpp");
200200
}
201201

202+
// cppcheck-suppress functionStatic
202203
void TestProjectFile::emptyUserInclude() const
203204
{
204205
ProjectFile projectFile;

gui/test/resultstree/testresultstree.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class TestReport : public Report {
6666
QString output;
6767
};
6868

69+
// cppcheck-suppress-begin [functionStatic,functionConst]
6970
// Mock GUI...
7071
ProjectFile::ProjectFile(QObject *parent) : QObject(parent) {}
7172
ProjectFile *ProjectFile::mActiveProject;
@@ -127,6 +128,7 @@ void ThreadResult::reportErr(const ErrorMessage & /*unused*/) {
127128
void ThreadResult::reportProgress(const std::string &/*filename*/, const char /*stage*/[], const std::size_t /*value*/) {
128129
throw 1;
129130
}
131+
// cppcheck-suppress-end [functionStatic,functionConst]
130132

131133
// Test...
132134

@@ -144,6 +146,7 @@ void TestResultsTree::test1() const
144146
QCOMPARE(tree.isRowHidden(0,QModelIndex()), false); // Show item
145147
}
146148

149+
// cppcheck-suppress functionStatic
147150
void TestResultsTree::duplicateResults() const
148151
{
149152
// #14359 - filter out duplicate warnings
@@ -302,6 +305,7 @@ void TestResultsTree::testReportType() const
302305
"missingReturn,Mandatory,17.4");
303306
}
304307

308+
// cppcheck-suppress functionStatic
305309
void TestResultsTree::testReportTypeIcon() const {
306310
ResultsTree tree(nullptr);
307311
tree.setReportType(ReportType::misraC2012);

0 commit comments

Comments
 (0)