CheckOther: Use Variable::valueType() instead of Variable::typeStartToken

This commit is contained in:
Daniel Marjamäki 2018-06-23 16:52:40 +02:00
parent fc78530b3f
commit 697aee143f
1 changed files with 1 additions and 1 deletions

View File

@ -2366,7 +2366,7 @@ void CheckOther::checkIncompleteArrayFill()
if ((size != 1 && size != 100 && size != 0) || var->isPointer()) {
if (printWarning)
incompleteArrayFillError(tok, var->name(), tok->str(), false);
} else if (Token::Match(var->typeStartToken(), "bool|_Bool") && printPortability) // sizeof(bool) is not 1 on all platforms
} else if (var->valueType()->type == ValueType::Type::BOOL && printPortability) // sizeof(bool) is not 1 on all platforms
incompleteArrayFillError(tok, var->name(), tok->str(), true);
}
}