Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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 recommendation 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.

Wiki MarkupSection 6.8.3 of C99 \ [[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] states that

The expression in an expression statement is evaluated as a void expression for its side effects.

...

Tool

Version

Checker

Description

Section

Coverity Prevent

Include Page
c:Coverity_Vc:
Coverity_V
Section

CHECKED_RETURN

Section

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

Section

Splint

Include Page
c:Splint_Vc:
Splint_V

 

 

Section

Compass/ROSE

 

 

 

Section

Klocwork

Include Page
c:Klocwork_Vc:
Klocwork_V
Section

SV.RVT.RETVAL_NOTTESTED

 

Section

LDRA tool suite

Include Page
c:LDRA_Vc:
LDRA_V
Section

382 S

Section

Fully Implemented

Section

ECLAIR

Include Page
c:ECLAIR_Vc:
ECLAIR_V
Section

ignrtrn

Section

Fully Implemented

...