diff --git a/lib/checkcondition.cpp b/lib/checkcondition.cpp index 103ee94b9..54a20f46a 100644 --- a/lib/checkcondition.cpp +++ b/lib/checkcondition.cpp @@ -307,14 +307,12 @@ void CheckCondition::comparison() const std::string& op(tok->str()); comparisonError(expr1, expr1->str(), num1, op, num2, op!="!=" ? false : true); } - } - else if (Token::simpleMatch(tok, ">")) { + } else if (Token::simpleMatch(tok, ">")) { if ((expr1->str() == "&" && (num1 <= num2))) { const std::string& op(tok->str()); comparisonError(expr1, expr1->str(), num1, op, num2, false); } - } - else if (Token::simpleMatch(tok, "<")) { + } else if (Token::simpleMatch(tok, "<")) { if ((expr1->str() == "|" && (num1 >= num2))) { const std::string& op(tok->str()); comparisonError(expr1, expr1->str(), num1, op, num2, false); diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 025f4a59f..113f75eba 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -33,8 +33,8 @@ namespace { CheckIO instance; } -// CVE ID used: -static const CWE CWE398(398U); // Indicator of Poor Code Quality +// CVE ID used: +static const CWE CWE398(398U); // Indicator of Poor Code Quality static const CWE CWE664(664U); static const CWE CWE685(685U); static const CWE CWE687(687U); diff --git a/lib/checkother.cpp b/lib/checkother.cpp index a9ea22fef..5d3bd0a24 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -117,7 +117,7 @@ void CheckOther::checkCastIntToCharAndBackError(const Token *tok, const std::str " When "+ strFunctionName +"() returns EOF this value is truncated. Comparing the char " "variable with EOF can have unexpected results. For instance a loop \"while (EOF != (c = "+ strFunctionName +"());\" " "loops forever on some compilers/platforms and on other compilers/platforms it will stop " - "when the file contains a matching character.", CWE197, false + "when the file contains a matching character.", CWE197, false ); }