Fix Cppcheck warning

This commit is contained in:
Daniel Marjamäki 2020-05-27 21:31:40 +02:00
parent 208e2c7fdf
commit 27fc5f1a2f
1 changed files with 3 additions and 1 deletions

View File

@ -2530,8 +2530,10 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
static void dumpRecursive(ExprEngine::ValuePtr val) static void dumpRecursive(ExprEngine::ValuePtr val)
{ {
if (!val) if (!val) {
std::cout << "NULL"; std::cout << "NULL";
return;
}
switch (val->type) { switch (val->type) {
case ExprEngine::ValueType::AddressOfValue: case ExprEngine::ValueType::AddressOfValue:
std::cout << "AddressOfValue(" << std::dynamic_pointer_cast<ExprEngine::AddressOfValue>(val)->varId << ")"; std::cout << "AddressOfValue(" << std::dynamic_pointer_cast<ExprEngine::AddressOfValue>(val)->varId << ")";