Skip to content

Commit 27d9aaa

Browse files
orbitcowboydanmar
authored andcommitted
checkother: Removed statement that is always true. (#1059)
1 parent 71ba513 commit 27d9aaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ void CheckOther::checkCharVariable()
15021502
v1 = tok->astOperand1()->getValueGE(0x80, _settings);
15031503
if (v1 && !(tok->str() == "&" && v2 && v2->isKnown() && v2->intvalue >= 0 && v2->intvalue < 0x100))
15041504
warn = true;
1505-
} else if (!warn && astIsSignedChar(tok->astOperand2())) {
1505+
} else if (astIsSignedChar(tok->astOperand2())) {
15061506
const ValueFlow::Value *v1 = tok->astOperand2()->getValueLE(-1, _settings);
15071507
const ValueFlow::Value *v2 = tok->astOperand1()->getMaxValue(false);
15081508
if (!v1)

0 commit comments

Comments
 (0)