...
Unused values may indicate significant logic errors.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MSC13-C | Low | Unlikely | Medium | P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||
---|---|---|---|---|---|---|---|
Astrée |
|
Supported, but no explicit checker | |||||||||
CodeSonar |
| LANG.STRUCT.UUVAL | Unused value | ||||||
| UNUSED_VALUE | Finds variables that are assigned pointer values returned from a function call but never used | |||||||
Klocwork |
|
LDRA tool suite |
| 1 D, 8 D, 105 D, 94 D, 15 D | Fully implemented | ||||||
Parasoft C/C++test |
|
|
| MISRA2008-0_1_3_b | Fully implemented | |||||||
Polyspace Bug Finder | R2016a | Function prototype has parameters not read or written in function body Variable never read after assignment | |||||||
PRQA QA-C |
| 1500, 1502, 3203, 3205, 3206, 3207, 3229, 3196, 2980, 2981, 2982, 2983, 2984, 2985, 2986 | Fully implemented | ||||||
SonarQube C/C++ Plugin |
| S1854 |
PVS-Studio | 6.22 | V519, V596, V603, V714, V744, V751, V763, V1001 | General analysis rule set |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
SEI CERT C++ Coding Standard | VOID MSC13-CPP. Detect and remove unused values |
ISO/IEC TR 24772 | Likely Incorrect Expressions [KOA] Dead and Deactivated Code [XYQ] Unused Variable [XYR] |
Bibliography
...
...