Versions Compared

Key

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

Many functions return useful values whether or not the function has side effects. In most cases, this value is used to signify whether the function successfully completed its task or if some error occurred. (See ERR02-C. Avoid in-band error indicators.) Other times, the value is the result of some computation and is an integral part of the function's API.

Section Subclause 6.8.3 of the C Standard [ISO/IEC 9899:2011] states:

...

Tool

Version

Checker

Description

Compass/ROSE

 

 

 

Coverity

Include Page
Coverity_V
Coverity_V

CHECKED_RETURN

Finds inconsistencies in how function call return values are handled. Coverity Prevent cannot discover all violations of this recommendation, so further verification is necessary

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.EXP12

Fully implemented

Klocwork

Include Page
Klocwork_V
Klocwork_V

SV.RVT.RETVAL_NOTTESTED

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V

382 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V
3200Fully implemented

Splint

Include Page
Splint_V
Splint_V

 

 

...

Bibliography

[ISO/IEC 9899:2011]Section Subclause 6.8.3, "Expression and Null Statements"

...