Fix logic glitch

Reported by Pc-Lint 9.x :o)

The code was working before as the AND operation
also matched in that specific case.

I verified that code is in use by commenting
it out and checked how many tests failed.
This commit is contained in:
Thomas Jarosch 2011-10-28 23:36:30 +02:00
parent 6ea3523ac8
commit dee03a09e4
1 changed files with 1 additions and 1 deletions

View File

@ -1243,7 +1243,7 @@ void CheckUnusedVar::checkFunctionVariableUsage()
unusedVariableError(usage._name, varname);
// variable has not been written but has been modified
else if (usage._modified & !usage._write)
else if (usage._modified && !usage._write)
unassignedVariableError(usage._name, varname);
// variable has been written but not read