Skip to content

Commit ddf638d

Browse files
committed
mitigated unmatchedSuppressions selfcheck warnings
1 parent c848d1b commit ddf638d

File tree

9 files changed

+0
-13
lines changed

9 files changed

+0
-13
lines changed

gui/checkthread.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ void CheckThread::analyseWholeProgram(const std::list<FileWithDetails> &files, c
124124
start();
125125
}
126126

127-
// cppcheck-suppress unusedFunction - TODO: false positive
128127
void CheckThread::run()
129128
{
130129
mState = Running;

lib/errorlogger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ class CPPCHECKLIB ErrorMessage {
190190
}
191191

192192
/** Verbose message (may be the same as the short message) */
193-
// cppcheck-suppress unusedFunction - used by GUI only
194193
const std::string &verboseMessage() const {
195194
return mVerboseMessage;
196195
}

lib/importproject.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,6 @@ void ImportProject::selectOneVsConfig(Platform::Type platform)
15051505
}
15061506
}
15071507

1508-
// cppcheck-suppress unusedFunction - used by GUI only
15091508
void ImportProject::selectVsConfigurations(Platform::Type platform, const std::vector<std::string> &configurations)
15101509
{
15111510
for (auto it = fileSettings.cbegin(); it != fileSettings.cend();) {
@@ -1530,7 +1529,6 @@ void ImportProject::selectVsConfigurations(Platform::Type platform, const std::v
15301529
}
15311530
}
15321531

1533-
// cppcheck-suppress unusedFunction - used by GUI only
15341532
std::list<std::string> ImportProject::getVSConfigs()
15351533
{
15361534
return std::list<std::string>(mAllVSConfigs.cbegin(), mAllVSConfigs.cend());

lib/keywords.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ static const std::unordered_set<std::string> cpp26_keywords_all = {
173173
CPP03_KEYWORDS, CPP11_KEYWORDS, CPP20_KEYWORDS
174174
};
175175

176-
// cppcheck-suppress unusedFunction
177176
const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
178177
{
179178
switch (cStd) {
@@ -193,7 +192,6 @@ const std::unordered_set<std::string>& Keywords::getAll(Standards::cstd_t cStd)
193192
cppcheck::unreachable();
194193
}
195194

196-
// cppcheck-suppress unusedFunction
197195
const std::unordered_set<std::string>& Keywords::getAll(Standards::cppstd_t cppStd) {
198196
switch (cppStd) {
199197
case Standards::cppstd_t::CPP03:
@@ -234,7 +232,6 @@ const std::unordered_set<std::string>& Keywords::getOnly(Standards::cstd_t cStd)
234232
cppcheck::unreachable();
235233
}
236234

237-
// cppcheck-suppress unusedFunction
238235
const std::unordered_set<std::string>& Keywords::getOnly(Standards::cppstd_t cppStd)
239236
{
240237
switch (cppStd) {

lib/mathlib.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,6 @@ static bool isValidIntegerSuffixIt(std::string::const_iterator it, std::string::
789789
(state == Status::SUFFIX_LITERAL));
790790
}
791791

792-
// cppcheck-suppress unusedFunction
793792
bool MathLib::isValidIntegerSuffix(const std::string& str, bool supportMicrosoftExtensions)
794793
{
795794
return isValidIntegerSuffixIt(str.cbegin(), str.cend(), supportMicrosoftExtensions);

lib/programmemory.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ const ValueFlow::Value* ProgramMemory::getValue(nonneg int exprid, bool impossib
9696
return nullptr;
9797
}
9898

99-
// cppcheck-suppress unusedFunction
10099
bool ProgramMemory::getIntValue(nonneg int exprid, MathLib::bigint& result) const
101100
{
102101
const ValueFlow::Value* value = getValue(exprid);

lib/suppressions.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ std::string SuppressionList::addSuppressions(std::list<Suppression> suppressions
302302
return "";
303303
}
304304

305-
// cppcheck-suppress unusedFunction
306305
bool SuppressionList::updateSuppressionState(const SuppressionList::Suppression& suppression)
307306
{
308307
std::lock_guard<std::mutex> lg(mSuppressionsSync);
@@ -446,7 +445,6 @@ bool SuppressionList::Suppression::isMatch(const SuppressionList::ErrorMessage &
446445
cppcheck::unreachable();
447446
}
448447

449-
// cppcheck-suppress unusedFunction - used by GUI only
450448
std::string SuppressionList::Suppression::getText() const
451449
{
452450
std::string ret;

lib/token.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,6 @@ const ValueFlow::Value* Token::getMovedValue() const
26302630
return it == mImpl->mValues->end() ? nullptr : &*it;
26312631
}
26322632

2633-
// cppcheck-suppress unusedFunction
26342633
const ValueFlow::Value* Token::getContainerSizeValue(const MathLib::bigint val) const
26352634
{
26362635
if (!mImpl->mValues)

lib/utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ T strToInt(const std::string& str)
291291
* \return size of array
292292
* */
293293
template<typename T, int size>
294-
// cppcheck-suppress unusedFunction - only used in conditional code
295294
std::size_t getArrayLength(const T (& /*unused*/)[size])
296295
{
297296
return size;

0 commit comments

Comments
 (0)