Fix Coverity CID1490221 warning. settings is dereferenced and then checked.
This commit is contained in:
parent
d8239b26f1
commit
29402b4d1a
|
@ -986,8 +986,7 @@ static void setTokenValue(Token* tok,
|
||||||
ValueFlow::Value v(val);
|
ValueFlow::Value v(val);
|
||||||
v.intvalue = ~v.intvalue;
|
v.intvalue = ~v.intvalue;
|
||||||
int bits = 0;
|
int bits = 0;
|
||||||
if (settings &&
|
if (tok->valueType() &&
|
||||||
tok->valueType() &&
|
|
||||||
tok->valueType()->sign == ValueType::Sign::UNSIGNED &&
|
tok->valueType()->sign == ValueType::Sign::UNSIGNED &&
|
||||||
tok->valueType()->pointer == 0) {
|
tok->valueType()->pointer == 0) {
|
||||||
if (tok->valueType()->type == ValueType::Type::INT)
|
if (tok->valueType()->type == ValueType::Type::INT)
|
||||||
|
|
Loading…
Reference in New Issue