...
Code Block | ||||
---|---|---|---|---|
| ||||
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 |
|
|
| ||||||
| CC2.DCL01 | Fully implemented | |||||||
| IF_MULTI_DECL |
| |||||||
| 131 S | Fully implemented | |||||||
PRQA QA-C |
| 2547 | Fully implemented | ||||||
|
|
|
...