Versions Compared

Key

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

...

Code Block
bgColor#ccccff
langc
extern int name;
void f(char *name);  /* Declaration: no problem here */
/* ... */
void f(char *arg) {  /* Definition: no problem, arg doesn't hide name */
  /* useUse arg */
}

Risk Assessment

Reusing a variable name in a subscope can lead to unintentionally referencing an incorrect variable.

...

Tool

Version

Checker

Description

Compass/ROSE

 

 

 

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.DCL01

Fully implemented

Klocwork

Include Page
Klocwork_V
Klocwork_V

IF_MULTI_DECL
IF_MULTI_DEF
IF_MULTI_KIND

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V

131 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V

2547
3334

Fully implemented

Splint

Include Page
Splint_V
Splint_V

 

 

...