CheckOther: Use Variable::valueType() instead of Variable::typeStartToken
This commit is contained in:
parent
2a8296879c
commit
fc78530b3f
|
@ -2361,7 +2361,7 @@ void CheckOther::checkIncompleteArrayFill()
|
||||||
|
|
||||||
if (MathLib::toLongNumber(tok->linkAt(1)->strAt(-1)) == var->dimension(0)) {
|
if (MathLib::toLongNumber(tok->linkAt(1)->strAt(-1)) == var->dimension(0)) {
|
||||||
unsigned int size = mTokenizer->sizeOfType(var->typeStartToken());
|
unsigned int size = mTokenizer->sizeOfType(var->typeStartToken());
|
||||||
if (size == 0 && var->typeStartToken()->next()->str() == "*")
|
if (size == 0 && var->valueType()->pointer)
|
||||||
size = mSettings->sizeof_pointer;
|
size = mSettings->sizeof_pointer;
|
||||||
if ((size != 1 && size != 100 && size != 0) || var->isPointer()) {
|
if ((size != 1 && size != 100 && size != 0) || var->isPointer()) {
|
||||||
if (printWarning)
|
if (printWarning)
|
||||||
|
|
Loading…
Reference in New Issue