Skip to content

Commit 70e4ea3

Browse files
committed
fixed shadowFunction selfcheck warnings
1 parent 85dce52 commit 70e4ea3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

gui/test/resultstree/testresultstree.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void TestResultsTree::testReportType() const
274274
TestReport report("{id},{classification},{guideline}");
275275

276276
int msgCount = 0;
277-
auto createErrorItem = [&msgCount](const Severity severity, const QString& errorId) -> ErrorItem {
277+
auto createErrorItemFn = [&msgCount](const Severity severity, const QString& errorId) -> ErrorItem {
278278
++msgCount;
279279
ErrorItem errorItem;
280280
errorItem.errorPath << QErrorPathItem(ErrorMessage::FileLocation("file1.c", msgCount, 1));
@@ -287,8 +287,8 @@ void TestResultsTree::testReportType() const
287287
// normal report with 2 errors
288288
ResultsTree tree(nullptr);
289289
tree.updateSettings(false, false, false, false, false);
290-
tree.addErrorItem(createErrorItem(Severity::style, "id1"));
291-
tree.addErrorItem(createErrorItem(Severity::style, "unusedVariable")); // Misra C 2.8
290+
tree.addErrorItem(createErrorItemFn(Severity::style, "id1"));
291+
tree.addErrorItem(createErrorItemFn(Severity::style, "unusedVariable")); // Misra C 2.8
292292
tree.saveResults(&report);
293293
QCOMPARE(report.output, "id1,,\nunusedVariable,,");
294294

@@ -298,7 +298,7 @@ void TestResultsTree::testReportType() const
298298
QCOMPARE(report.output, "unusedVariable,Advisory,2.8");
299299

300300
// add "missingReturn" and check that it is added properly
301-
tree.addErrorItem(createErrorItem(Severity::warning, "missingReturn")); // Misra C 17.4
301+
tree.addErrorItem(createErrorItemFn(Severity::warning, "missingReturn")); // Misra C 17.4
302302
tree.saveResults(&report);
303303
QCOMPARE(report.output,
304304
"unusedVariable,Advisory,2.8\n"
@@ -341,7 +341,7 @@ void TestResultsTree::testGetGuidelineError() const
341341
TestReport report("{id},{classification},{guideline}");
342342

343343
int msgCount = 0;
344-
auto createErrorItem = [&msgCount](const Severity severity, const QString& errorId) -> ErrorItem {
344+
auto createErrorItemFn = [&msgCount](const Severity severity, const QString& errorId) -> ErrorItem {
345345
++msgCount;
346346
ErrorItem errorItem;
347347
errorItem.errorPath << QErrorPathItem(ErrorMessage::FileLocation("file1.c", msgCount, 1));
@@ -354,7 +354,7 @@ void TestResultsTree::testGetGuidelineError() const
354354
// normal report with 2 errors
355355
ResultsTree tree(nullptr);
356356
tree.setReportType(ReportType::misraC2012);
357-
tree.addErrorItem(createErrorItem(Severity::error, "id1")); // error severity => guideline 1.3
357+
tree.addErrorItem(createErrorItemFn(Severity::error, "id1")); // error severity => guideline 1.3
358358
tree.saveResults(&report);
359359
QCOMPARE(report.output, "id1,Required,1.3");
360360
}

0 commit comments

Comments
 (0)