From 7bbdb7a3ba22e400e3e839bd03252eff048a84b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 21 Feb 2008 19:05:11 +0000 Subject: [PATCH] removed false positives for CheckUnsignedDivision --- CheckOther.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CheckOther.cpp b/CheckOther.cpp index e7bba8825..c62a5620c 100644 --- a/CheckOther.cpp +++ b/CheckOther.cpp @@ -556,7 +556,7 @@ void CheckUnsignedDivision() tokdiv = findtoken(declvar, pattern_div2); 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; ostr << FileLine(tokdiv) << ": If the result is negative it will be wrong because an operand is unsigned.";