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:
parent
6ea3523ac8
commit
dee03a09e4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue