Skip to content

Commit 5143af8

Browse files
committed
fixed unmatchedSuppression selfcheck warnings
1 parent aedcf4d commit 5143af8

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

lib/checkclass.cpp

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

lib/keywords.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ static const std::unordered_set<std::string> cpp23_keywords_all = cpp20_keywords
155155
// cppcheck-suppress unusedFunction
156156
const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
157157
{
158-
// cppcheck-suppress missingReturn
159158
switch (cStd) {
160159
case Standards::cstd_t::C89:
161160
return c89_keywords_all;
@@ -171,7 +170,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
171170

172171
// cppcheck-suppress unusedFunction
173172
const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppStd) {
174-
// cppcheck-suppress missingReturn
175173
switch (cppStd) {
176174
case Standards::cppstd_t::CPP03:
177175
return cpp03_keywords_all;
@@ -192,7 +190,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppS
192190
// cppcheck-suppress unusedFunction
193191
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
194192
{
195-
// cppcheck-suppress missingReturn
196193
switch (cStd) {
197194
case Standards::cstd_t::C89:
198195
return c89_keywords;
@@ -209,7 +206,6 @@ const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
209206
// cppcheck-suppress unusedFunction
210207
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cppstd_t cppStd)
211208
{
212-
// cppcheck-suppress missingReturn
213209
switch (cppStd) {
214210
case Standards::cppstd_t::CPP03:
215211
return cpp03_keywords;

lib/valueflow.cpp

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

78057804
static std::vector<Token*> findAllUsages(const Variable* var,
7806-
Token* start, // cppcheck-suppress constParameterPointer // FP
7805+
Token* start,
78077806
const Library* library)
78087807
{
78097808
// std::vector<Token*> result;

0 commit comments

Comments
 (0)