removed false positives for CheckUnsignedDivision
This commit is contained in:
parent
97003e8064
commit
7bbdb7a3ba
|
@ -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.";
|
||||||
|
|
Loading…
Reference in New Issue