Closed mjeronimo closed 2 years ago
Updated the implementation of Rule 14 (d,e,f,and g) to remove this false positive. The checker verified if the result of the fct call was used in an assignment, or in a condition (indicated by the call appearing inside round braces). The example used a condition without the round braces. The fix now checks if the fct call is preceded or followed by a boolean operator as well, to address this case. thanks for the report and the example!
Using the jpl ruleset, this rule indicates that the code does not check the return value. However, the calls return the return a duration and are then used in a boolean expression. Not sure what checking could happen on the return values.
Also, the rule complains about this:
but not this:
Which are semantically equivalent.
To reproduce:
Where t.c contains:
Results in: