Skip to content

Commit f5884e7

Browse files
committed
fixed unmatchedSuppression selfcheck warnings
1 parent 43710cc commit f5884e7

17 files changed

Lines changed: 8 additions & 36 deletions

.selfcheck_suppressions

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ missingIncludeSystem
22

33
# temporary suppressions - fix the warnings!
44
simplifyUsing:lib/valueptr.h
5-
varid0:gui/projectfile.cpp
65
naming-privateMemberVariable:gui/test/cppchecklibrarydata/testcppchecklibrarydata.h
76
symbolDatabaseWarning:*/moc_*.cpp
87
simplifyUsing:*/moc_*.cpp
@@ -22,8 +21,6 @@ templateInstantiation:test/testutils.cpp
2221
naming-varname:externals/simplecpp/simplecpp.h
2322
naming-privateMemberVariable:externals/simplecpp/simplecpp.h
2423

25-
valueFlowMaxIterations:externals/tinyxml2/tinyxml2.cpp
26-
2724
# TODO: these warnings need to be addressed upstream
2825
uninitMemberVar:externals/tinyxml2/tinyxml2.h
2926
noExplicitConstructor:externals/tinyxml2/tinyxml2.h

cli/signalhandler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ static const Signalmap_t listofsignals = {
108108
* but when ending up here something went terribly wrong anyway.
109109
* And all which is left is just printing some information and terminate.
110110
*/
111-
// cppcheck-suppress constParameterCallback
112111
static void CppcheckSignalHandler(int signo, siginfo_t * info, void * context)
113112
{
114113
int type = -1;

gui/checkthread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static QString unquote(QString s) {
6363
}
6464

6565
// NOLINTNEXTLINE(performance-unnecessary-value-param) - used as callback so we need to preserve the signature
66-
int CheckThread::executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string &output) // cppcheck-suppress [passedByValue,passedByValueCallback]
66+
int CheckThread::executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string &output) // cppcheck-suppress passedByValueCallback
6767
{
6868
output.clear();
6969

lib/checkclass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3131,7 +3131,6 @@ void CheckClass::checkCopyCtorAndEqOperator()
31313131
{
31323132
// This is disabled because of #8388
31333133
// The message must be clarified. How is the behaviour different?
3134-
// cppcheck-suppress unreachableCode - remove when code is enabled again
31353134
if ((true) || !mSettings->severity.isEnabled(Severity::warning)) // NOLINT(readability-simplify-boolean-expr)
31363135
return;
31373136

lib/checkcondition.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,6 @@ void CheckCondition::checkIncorrectLogicOperator()
13211321
const std::string text = cond1str + " " + tok->str() + " " + cond2str;
13221322
incorrectLogicOperatorError(tok, text, alwaysTrue, inconclusive, std::move(errorPath));
13231323
} else if (printStyle && (firstTrue || secondTrue)) {
1324-
// cppcheck-suppress accessMoved - TODO: FP - see #12174
13251324
const int which = isfloat ? sufficientCondition(std::move(op1), not1, d1, std::move(op2), not2, d2, isAnd) : sufficientCondition(std::move(op1), not1, i1, std::move(op2), not2, i2, isAnd);
13261325
std::string text;
13271326
if (which != 0) {

lib/checkunusedfunctions.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,7 @@ void CheckUnusedFunctions::updateFunctionData(const CheckUnusedFunctions& check)
522522
usage.fileIndex = entry.second.fileIndex;
523523
if (usage.filename.empty())
524524
usage.filename = entry.second.filename;
525-
// cppcheck-suppress bitwiseOnBoolean - TODO: FP
526525
usage.usedOtherFile |= entry.second.usedOtherFile;
527-
// cppcheck-suppress bitwiseOnBoolean - TODO: FP
528526
usage.usedSameFile |= entry.second.usedSameFile;
529527
}
530528
mFunctionDecl.insert(mFunctionDecl.cend(), check.mFunctionDecl.cbegin(), check.mFunctionDecl.cend());

lib/keywords.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ static const std::unordered_set<std::string> cpp26_keywords_all = {
169169
// cppcheck-suppress unusedFunction
170170
const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
171171
{
172-
// cppcheck-suppress missingReturn
173172
switch (cStd) {
174173
case Standards::cstd_t::C89:
175174
return c89_keywords_all;
@@ -187,7 +186,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
187186

188187
// cppcheck-suppress unusedFunction
189188
const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppStd) {
190-
// cppcheck-suppress missingReturn
191189
switch (cppStd) {
192190
case Standards::cppstd_t::CPP03:
193191
return cpp03_keywords_all;
@@ -210,7 +208,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppS
210208
// cppcheck-suppress unusedFunction
211209
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
212210
{
213-
// cppcheck-suppress missingReturn
214211
switch (cStd) {
215212
case Standards::cstd_t::C89:
216213
return c89_keywords;
@@ -229,7 +226,6 @@ const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
229226
// cppcheck-suppress unusedFunction
230227
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cppstd_t cppStd)
231228
{
232-
// cppcheck-suppress missingReturn
233229
switch (cppStd) {
234230
case Standards::cppstd_t::CPP03:
235231
return cpp03_keywords;

lib/path.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ static bool hasEmacsCppMarker(const char* path)
318318

319319
Standards::Language Path::identify(const std::string &path, bool cppHeaderProbe, bool *header)
320320
{
321-
// cppcheck-suppress uninitvar - TODO: FP
322321
if (header)
323322
*header = false;
324323

@@ -336,7 +335,6 @@ Standards::Language Path::identify(const std::string &path, bool cppHeaderProbe,
336335
return Standards::Language::CPP;
337336
if (c_src_exts.find(ext) != c_src_exts.end())
338337
return Standards::Language::C;
339-
// cppcheck-suppress knownConditionTrueFalse - TODO: FP
340338
if (!caseInsensitiveFilesystem())
341339
strTolower(ext);
342340
if (ext == ".h") {

lib/smallvector.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ template<class T, std::size_t N>
3636
struct TaggedAllocator : std::allocator<T>
3737
{
3838
template<class ... Ts>
39-
// cppcheck-suppress noExplicitConstructor
4039
// NOLINTNEXTLINE(google-explicit-constructor)
4140
TaggedAllocator(Ts&&... ts)
4241
: std::allocator<T>(std::forward<Ts>(ts)...)

lib/symboldatabase.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,14 +1435,12 @@ class CPPCHECKLIB SymbolDatabase {
14351435
void createSymbolDatabaseNeedInitialization();
14361436
void createSymbolDatabaseVariableSymbolTable();
14371437
void createSymbolDatabaseSetScopePointers();
1438-
void createSymbolDatabaseSetFunctionPointers(bool firstPass); // cppcheck-suppress functionConst // has side effects
1438+
void createSymbolDatabaseSetFunctionPointers(bool firstPass);
14391439
void createSymbolDatabaseSetVariablePointers();
1440-
// cppcheck-suppress functionConst
14411440
void createSymbolDatabaseSetTypePointers();
14421441
void createSymbolDatabaseSetSmartPointerType();
1443-
void createSymbolDatabaseEnums(); // cppcheck-suppress functionConst // has side effects
1444-
void createSymbolDatabaseEscapeFunctions(); // cppcheck-suppress functionConst // has side effects
1445-
// cppcheck-suppress functionConst
1442+
void createSymbolDatabaseEnums();
1443+
void createSymbolDatabaseEscapeFunctions();
14461444
void createSymbolDatabaseIncompleteVars();
14471445

14481446
void debugSymbolDatabase() const;

0 commit comments

Comments
 (0)