From 27d9aaa8f58539beecb951ffa032129916c699cd Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Fri, 26 Jan 2018 22:49:07 +0100 Subject: [PATCH] checkother: Removed statement that is always true. (#1059) --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index fe76191b2..0bdac8cb0 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1502,7 +1502,7 @@ void CheckOther::checkCharVariable() v1 = tok->astOperand1()->getValueGE(0x80, _settings); if (v1 && !(tok->str() == "&" && v2 && v2->isKnown() && v2->intvalue >= 0 && v2->intvalue < 0x100)) warn = true; - } else if (!warn && astIsSignedChar(tok->astOperand2())) { + } else if (astIsSignedChar(tok->astOperand2())) { const ValueFlow::Value *v1 = tok->astOperand2()->getValueLE(-1, _settings); const ValueFlow::Value *v2 = tok->astOperand1()->getMaxValue(false); if (!v1)