Skip to content

Commit b26bdaa

Browse files
committed
fixed unmatchedSuppression selfcheck warnings
1 parent 2b7893e commit b26bdaa

16 files changed

Lines changed: 3 additions & 32 deletions

.selfcheck_suppressions

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ 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
7-
symbolDatabaseWarning:*/moc_*.cpp
86
simplifyUsing:*/moc_*.cpp
97

108
# warnings in Qt generated code we cannot fix
119
funcArgNamesDifferent:*/moc_*.cpp
1210
naming-varname:*/ui_*.h
1311
functionStatic:*/ui_fileview.h
14-
constVariablePointer:*/moc_test*.cpp
1512

1613
# --debug-warnings suppressions
1714
valueFlowBailout
@@ -23,8 +20,6 @@ templateInstantiation:test/testutils.cpp
2320
naming-varname:externals/simplecpp/simplecpp.h
2421
naming-privateMemberVariable:externals/simplecpp/simplecpp.h
2522

26-
valueFlowMaxIterations:externals/tinyxml2/tinyxml2.cpp
27-
2823
# TODO: these warnings need to be addressed upstream
2924
uninitMemberVar:externals/tinyxml2/tinyxml2.h
3025
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
@@ -58,7 +58,7 @@ static QString unquote(QString s) {
5858
}
5959

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

lib/checkclass.cpp

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

lib/checkcondition.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,6 @@ void CheckCondition::checkIncorrectLogicOperator()
13411341
const std::string text = cond1str + " " + tok->str() + " " + cond2str;
13421342
incorrectLogicOperatorError(tok, text, alwaysTrue, inconclusive, std::move(errorPath));
13431343
} else if (printStyle && (firstTrue || secondTrue)) {
1344-
// cppcheck-suppress accessMoved - TODO: FP - see #12174
13451344
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);
13461345
std::string text;
13471346
if (which != 0) {

lib/checkunusedfunctions.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,7 @@ void CheckUnusedFunctions::updateFunctionData(const CheckUnusedFunctions& check)
533533
usage.fileIndex = entry.second.fileIndex;
534534
if (usage.filename.empty())
535535
usage.filename = entry.second.filename;
536-
// cppcheck-suppress bitwiseOnBoolean - TODO: FP
537536
usage.usedOtherFile |= entry.second.usedOtherFile;
538-
// cppcheck-suppress bitwiseOnBoolean - TODO: FP
539537
usage.usedSameFile |= entry.second.usedSameFile;
540538
}
541539
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
@@ -176,7 +176,6 @@ static const std::unordered_set<std::string> cpp26_keywords_all = {
176176
// cppcheck-suppress unusedFunction
177177
const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
178178
{
179-
// cppcheck-suppress missingReturn
180179
switch (cStd) {
181180
case Standards::cstd_t::C89:
182181
return c89_keywords_all;
@@ -196,7 +195,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
196195

197196
// cppcheck-suppress unusedFunction
198197
const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppStd) {
199-
// cppcheck-suppress missingReturn
200198
switch (cppStd) {
201199
case Standards::cppstd_t::CPP03:
202200
return cpp03_keywords_all;
@@ -219,7 +217,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppS
219217
// cppcheck-suppress unusedFunction
220218
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
221219
{
222-
// cppcheck-suppress missingReturn
223220
switch (cStd) {
224221
case Standards::cstd_t::C89:
225222
return c89_keywords;
@@ -240,7 +237,6 @@ const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
240237
// cppcheck-suppress unusedFunction
241238
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cppstd_t cppStd)
242239
{
243-
// cppcheck-suppress missingReturn
244240
switch (cppStd) {
245241
case Standards::cppstd_t::CPP03:
246242
return cpp03_keywords;

lib/path.cpp

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

326326
Standards::Language Path::identify(const std::string &path, bool cppHeaderProbe, bool *header)
327327
{
328-
// cppcheck-suppress uninitvar - TODO: FP
329328
if (header)
330329
*header = false;
331330

@@ -343,7 +342,6 @@ Standards::Language Path::identify(const std::string &path, bool cppHeaderProbe,
343342
return Standards::Language::CPP;
344343
if (c_src_exts.find(ext) != c_src_exts.end())
345344
return Standards::Language::C;
346-
// cppcheck-suppress knownConditionTrueFalse - TODO: FP
347345
if (!caseInsensitiveFilesystem())
348346
strTolower(ext);
349347
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/tokenize.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3634,7 +3634,6 @@ void Tokenizer::concatenateNegativeNumberAndAnyPositive()
36343634
tok->deleteNext();
36353635

36363636
if (Token::Match(tok->next(), "+|- %num%")) {
3637-
// cppcheck-suppress redundantCopyLocalConst - cannot make it a reference because it is deleted afterwards
36383637
std::string prefix = tok->strAt(1);
36393638
tok->deleteNext();
36403639
tok->next()->str(prefix + tok->strAt(1));

0 commit comments

Comments
 (0)