Skip to content

Commit 81bcee2

Browse files
committed
fixed unmatchedSuppression selfcheck warnings
1 parent 4aa6610 commit 81bcee2

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

.selfcheck_suppressions

Lines changed: 0 additions & 1 deletion
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

lib/checkclass.cpp

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

lib/keywords.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ static const std::unordered_set<std::string> cpp23_keywords_all = cpp20_keywords
153153
// cppcheck-suppress unusedFunction
154154
const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
155155
{
156-
// cppcheck-suppress missingReturn
157156
switch (cStd) {
158157
case Standards::cstd_t::C89:
159158
return c89_keywords_all;
@@ -169,7 +168,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
169168

170169
// cppcheck-suppress unusedFunction
171170
const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppStd) {
172-
// cppcheck-suppress missingReturn
173171
switch (cppStd) {
174172
case Standards::cppstd_t::CPP03:
175173
return cpp03_keywords_all;
@@ -190,7 +188,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppS
190188
// cppcheck-suppress unusedFunction
191189
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
192190
{
193-
// cppcheck-suppress missingReturn
194191
switch (cStd) {
195192
case Standards::cstd_t::C89:
196193
return c89_keywords;
@@ -207,7 +204,6 @@ const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
207204
// cppcheck-suppress unusedFunction
208205
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cppstd_t cppStd)
209206
{
210-
// cppcheck-suppress missingReturn
211207
switch (cppStd) {
212208
case Standards::cppstd_t::CPP03:
213209
return cpp03_keywords;

lib/valueflow.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,6 @@ static void setTokenValue(Token* tok,
791791
}
792792
} else if (!value.isImpossible()) {
793793
// is condition only depending on 1 variable?
794-
// cppcheck-suppress[variableScope] #8541
795794
nonneg int varId = 0;
796795
bool ret = false;
797796
visitAstNodes(parent->astOperand1(),
@@ -7886,7 +7885,7 @@ static void addToErrorPath(ValueFlow::Value& value, const ValueFlow::Value& from
78867885
}
78877886

78887887
static std::vector<Token*> findAllUsages(const Variable* var,
7889-
Token* start, // cppcheck-suppress constParameterPointer // FP
7888+
Token* start,
78907889
const Library* library)
78917890
{
78927891
// std::vector<Token*> result;

0 commit comments

Comments
 (0)