diff --git a/.travis_suppressions b/.travis_suppressions index 86a138e8b..36c9f9417 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -16,7 +16,6 @@ symbolDatabaseWarning:tools/triage/moc_*.cpp # debug suppressions valueFlowBailout valueFlowBailoutIncompleteVar -varid0 autoNoType bailoutUninitVar diff --git a/lib/calculate.h b/lib/calculate.h index be0b6a9f9..6970b6265 100644 --- a/lib/calculate.h +++ b/lib/calculate.h @@ -48,6 +48,7 @@ bool isZero(T x) template 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}; }; diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 6b8f91b1a..783cd47ab 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1161,6 +1161,7 @@ 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); diff --git a/lib/summaries.cpp b/lib/summaries.cpp index 034af16a6..016634e21 100644 --- a/lib/summaries.cpp +++ b/lib/summaries.cpp @@ -58,6 +58,7 @@ std::string Summaries::create(const Tokenizer *tokenizer, const std::string &cfg } // Write summary for function + // cppcheck-suppress varid0 auto join = [](const std::set &data) -> std::string { std::string ret; const char *sep = ""; diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 8793058be..0c6108b8b 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -3967,6 +3967,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s argType = findVariableTypeIncludingUsedNamespaces(symbolDatabase, scope, typeTok); // save type + // cppcheck-suppress varid0 const_cast(typeTok)->type(argType); } diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 483d77f24..9d1e48cf0 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -4138,6 +4138,7 @@ static void valueFlowLifetime(TokenList *tokenlist, SymbolDatabase*, ErrorLogger }; bool update = false; + // cppcheck-suppress varid0 auto captureVariable = [&](const Token* tok2, Lambda::Capture c, std::function pred) { if (varids.count(tok->varId()) > 0) return;