removed false positives for CheckUnsignedDivision

This commit is contained in:
Daniel Marjamäki 2008-02-21 19:05:11 +00:00
parent 97003e8064
commit 7bbdb7a3ba
1 changed files with 1 additions and 1 deletions

View File

@ -556,7 +556,7 @@ void CheckUnsignedDivision()
tokdiv = findtoken(declvar, pattern_div2); tokdiv = findtoken(declvar, pattern_div2);
while ( tokdiv ) while ( tokdiv )
{ {
if ( tokdiv->str[0] != ')' ) // The ')' may indicate a cast if (!IsNumber(getstr(tokdiv,3)) && tokdiv->str[0]!=')') // The ')' may indicate a cast
{ {
std::ostringstream ostr; std::ostringstream ostr;
ostr << FileLine(tokdiv) << ": If the result is negative it will be wrong because an operand is unsigned."; ostr << FileLine(tokdiv) << ": If the result is negative it will be wrong because an operand is unsigned.";