Skip to content

Commit 236073c

Browse files
committed
made all suppressions in cfg tests inline / added TODOs [skip ci]
1 parent 91f1a25 commit 236073c

File tree

15 files changed

+38
-16
lines changed

15 files changed

+38
-16
lines changed

test/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ if (BUILD_TESTS)
115115
else()
116116
# TODO: remove missingInclude disabling when it no longer is implied by --enable=information
117117
# TODO: add syntax check
118-
# need to suppress unmatchedSuppression in case valueFlowBailout is not reported
119118
add_test(NAME cfg-${TEST_NAME}
120119
COMMAND $<TARGET_FILE:cppcheck>
121120
--library=${LIBRARY}
@@ -129,9 +128,6 @@ if (BUILD_TESTS)
129128
--disable=missingInclude
130129
--inline-suppr
131130
--debug-warnings
132-
--suppress=valueFlowBailout
133-
--suppress=purgedConfiguration
134-
--suppress=unmatchedSuppression
135131
--suppress=checkersReport
136132
${CMAKE_CURRENT_SOURCE_DIR}/cfg/${CFG_TEST}
137133
)

test/cfg/boost.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <boost/config.hpp>
1113
#include <boost/math/special_functions/round.hpp>
1214
#include <boost/endian/conversion.hpp>

test/cfg/bsd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
77
//
88

9+
// cppcheck-suppress-file valueFlowBailout
10+
911
#include <string.h>
1012
#include <stdlib.h>
1113
#include <stdint.h>

test/cfg/cppunit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
77
//
88

9+
// cppcheck-suppress-file valueFlowBailout
10+
911
#include <cppunit/TestAssert.h>
1012

1113
void cppunit_assert_equal(int x, double y)

test/cfg/gnu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <string.h>
1113
#include <stdlib.h>
1214
#include <stdint.h>

test/cfg/googletest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <gmock/gmock-generated-matchers.h>
1113
#include <gtest/gtest.h>
1214

test/cfg/libcurl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <curl/curl.h>
1113
#include <stdio.h>
1214

test/cfg/opencv2.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <iostream>
1113
#include <opencv2/opencv.hpp>
1214

test/cfg/posix.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file [valueFlowBailout,purgedConfiguration]
11+
1012
#define _BSD_SOURCE
1113

1214
#include <aio.h>

test/cfg/qt.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
88
//
99

10+
// cppcheck-suppress-file valueFlowBailout
11+
1012
#include <QObject>
1113
#include <QString>
1214
#include <QVector>
@@ -576,7 +578,7 @@ void validCode(int * pIntPtr, QString & qstrArg, double d)
576578

577579
printf(QT_TR_NOOP("Hi"));
578580

579-
// cppcheck-suppress [checkLibraryFunction,valueFlowBailoutIncompleteVar]
581+
// cppcheck-suppress valueFlowBailoutIncompleteVar
580582
Q_DECLARE_LOGGING_CATEGORY(logging_category_test);
581583
QT_FORWARD_DECLARE_CLASS(forwardDeclaredClass);
582584
QT_FORWARD_DECLARE_STRUCT(forwardDeclaredStruct);

0 commit comments

Comments
 (0)