...
Code Block |
---|
|
if (a == b) {
/* ... */
}
|
Risk Assessment
Errors of omission can result in unintended program flow.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|
EXP15-C | High | Likely | Low | P27 | L1 |
Automated Detection
9.5EXP19Fully implemented | PRQA QA-C | Include Page |
---|
PRQA QA-C_v | PRQA QA-C_v | 3109 | a | Suspicious use of semicolon |
PC-lint Plus | Include Page |
---|
| PC-lint Plus_V |
---|
| PC-lint Plus_V |
---|
|
| 721, 722 | Partially supported: reports missing body from if, for, or while with semi-colon immediately following predicate |
Polyspace Bug Finder | Include Page |
---|
| Polyspace Bug Finder_V |
---|
| Polyspace Bug Finder_V |
---|
|
| CERT C: Rec. EXP15-C | Checks for semicolon on same line as for, if or while statement (rule fully covered) |
PVS-Studio | | V529, V715 |
|
|
RuleChecker | Include Page |
---|
| RuleChecker_V |
---|
| RuleChecker_V |
---|
|
| empty-body | Fully checked |
Related Guidelines
Bibliography
[Hatton 1995] | Section 2.7.2, "Errors of Omission and Addition" |
...
...