removed unnecessary varid0 inline suppressions (#3893)

This commit is contained in:
Oliver Stöneberg 2022-03-12 18:02:40 +01:00 committed by GitHub
parent 3df170c191
commit 757287b13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 5 deletions

View File

@ -48,7 +48,6 @@ bool isZero(T x)
template<class R, class T>
R calculate(const std::string& s, const T& x, const T& y, bool* error = nullptr)
{
// cppcheck-suppress varid0
auto wrap = [](T z) {
return R{z};
};

View File

@ -1163,7 +1163,6 @@ static int estimateSize(const Type* type, const Settings* settings, const Symbol
int cumulatedSize = 0;
const bool isUnion = type->classScope->type == Scope::ScopeType::eUnion;
// cppcheck-suppress varid0
const auto accumulateSize = [](int& cumulatedSize, int size, bool isUnion) -> void {
if (isUnion)
cumulatedSize = std::max(cumulatedSize, size);

View File

@ -58,7 +58,6 @@ std::string Summaries::create(const Tokenizer *tokenizer, const std::string &cfg
}
// Write summary for function
// cppcheck-suppress varid0
auto join = [](const std::set<std::string> &data) -> std::string {
std::string ret;
const char *sep = "";

View File

@ -3995,7 +3995,6 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
argType = findVariableTypeIncludingUsedNamespaces(symbolDatabase, scope, typeTok);
// save type
// cppcheck-suppress varid0
const_cast<Token *>(typeTok)->type(argType);
}

View File

@ -4294,7 +4294,6 @@ static void valueFlowLifetime(TokenList *tokenlist, SymbolDatabase*, ErrorLogger
};
bool update = false;
// cppcheck-suppress varid0
auto captureVariable = [&](const Token* tok2, LifetimeCapture c, std::function<bool(const Token*)> pred) {
if (varids.count(tok->varId()) > 0)
return;