Skip to content

Commit 29402b4

Browse files
committed
Fix Coverity CID1490221 warning. settings is dereferenced and then checked.
1 parent d8239b2 commit 29402b4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,7 @@ static void setTokenValue(Token* tok,
986986
ValueFlow::Value v(val);
987987
v.intvalue = ~v.intvalue;
988988
int bits = 0;
989-
if (settings &&
990-
tok->valueType() &&
989+
if (tok->valueType() &&
991990
tok->valueType()->sign == ValueType::Sign::UNSIGNED &&
992991
tok->valueType()->pointer == 0) {
993992
if (tok->valueType()->type == ValueType::Type::INT)

0 commit comments

Comments
 (0)