Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Coverity Prevent Version 5.0 NEGATIVE_RETURNS and REVERSE_NEGATIVE checkers both can find violations of this rule. The NEGATIVE_RETURNS checker can find array accesses, loop bounds, and other expressions that may contain dangerous implied integer conversions that would result in unexpected behavior. The REVERSE_NEGATIVE checker can find instances where a negativity check occurs after the negative value has been used for something else. The MISRA_CAST checker can find the instances where an integer expression is implicitly converted to a narrower integer type, or implicitly converting the signedness of an integer value or implicitly converting the type of a complex expression. Coverity Prevent cannot discover all violations of this rule, so further verification is necessary.

...