From 697aee143f68db55df2b2acb1abe8448a3d1babb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 23 Jun 2018 16:52:40 +0200 Subject: [PATCH] CheckOther: Use Variable::valueType() instead of Variable::typeStartToken --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 9579ba0a0..3115e4434 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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); } }