astyle formatting
This commit is contained in:
parent
335c5a9c5a
commit
00a584d8d1
|
@ -307,14 +307,12 @@ void CheckCondition::comparison()
|
||||||
const std::string& op(tok->str());
|
const std::string& op(tok->str());
|
||||||
comparisonError(expr1, expr1->str(), num1, op, num2, op!="!=" ? false : true);
|
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))) {
|
if ((expr1->str() == "&" && (num1 <= num2))) {
|
||||||
const std::string& op(tok->str());
|
const std::string& op(tok->str());
|
||||||
comparisonError(expr1, expr1->str(), num1, op, num2, false);
|
comparisonError(expr1, expr1->str(), num1, op, num2, false);
|
||||||
}
|
}
|
||||||
}
|
} else if (Token::simpleMatch(tok, "<")) {
|
||||||
else if (Token::simpleMatch(tok, "<")) {
|
|
||||||
if ((expr1->str() == "|" && (num1 >= num2))) {
|
if ((expr1->str() == "|" && (num1 >= num2))) {
|
||||||
const std::string& op(tok->str());
|
const std::string& op(tok->str());
|
||||||
comparisonError(expr1, expr1->str(), num1, op, num2, false);
|
comparisonError(expr1, expr1->str(), num1, op, num2, false);
|
||||||
|
|
|
@ -33,8 +33,8 @@ namespace {
|
||||||
CheckIO instance;
|
CheckIO instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CVE ID used:
|
// CVE ID used:
|
||||||
static const CWE CWE398(398U); // Indicator of Poor Code Quality
|
static const CWE CWE398(398U); // Indicator of Poor Code Quality
|
||||||
static const CWE CWE664(664U);
|
static const CWE CWE664(664U);
|
||||||
static const CWE CWE685(685U);
|
static const CWE CWE685(685U);
|
||||||
static const CWE CWE687(687U);
|
static const CWE CWE687(687U);
|
||||||
|
|
|
@ -117,7 +117,7 @@ void CheckOther::checkCastIntToCharAndBackError(const Token *tok, const std::str
|
||||||
" When "+ strFunctionName +"() returns EOF this value is truncated. Comparing the char "
|
" 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 +"());\" "
|
"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 "
|
"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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue