diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index 8f469ec19..eec6924ca 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -2189,7 +2189,6 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, }; #endif -#ifdef BUG_HUNTING_UNINIT std::function uninit = [=](const Token *tok, const ExprEngine::Value &value, ExprEngine::DataBase *dataBase) { if (!tok->astParent()) return; @@ -2253,7 +2252,6 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninit", "Cannot determine that '" + tok->expressionString() + "' is initialized", CWE_USE_OF_UNINITIALIZED_VARIABLE, false); errorLogger->reportErr(errmsg); }; -#endif std::function checkFunctionCall = [=](const Token *tok, const ExprEngine::Value &value, ExprEngine::DataBase *dataBase) { if (!Token::Match(tok->astParent(), "[(,]")) @@ -2353,7 +2351,6 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, } } -#ifdef BUG_HUNTING_UNINIT // Uninitialized function argument.. if (settings->library.isuninitargbad(parent->astOperand1(), num) && settings->library.isnullargbad(parent->astOperand1(), num) && value.type == ExprEngine::ValueType::ArrayValue) { const ExprEngine::ArrayValue &arrayValue = static_cast(value); @@ -2368,7 +2365,6 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, } } } -#endif }; std::function checkAssignment = [=](const Token *tok, const ExprEngine::Value &value, ExprEngine::DataBase *dataBase) { @@ -2410,9 +2406,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, #ifdef BUG_HUNTING_INTEGEROVERFLOW callbacks.push_back(integerOverflow); #endif -#ifdef BUG_HUNTING_UNINIT callbacks.push_back(uninit); -#endif std::ostringstream report; ExprEngine::executeAllFunctions(errorLogger, tokenizer, settings, callbacks, report);