Versions Compared

Key

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

...

Code Block
bgColor#ccccff
langc
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

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
empty-bodyFully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-EXP15Fully implemented
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
LANG.STRUCT.EBSEmpty branch statement
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C3109
Klocwork
Include Page
Klocwork_V
Klocwork_V

SEMICOL

 


LDRA tool suite
Include Page
LDRA_V
LDRA_V
11 S, 12 S, 428 SFully Implemented
PRQA QA-C Include PagePRQA QA-C_vPRQA QA-C_v3109
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-EXP15-aSuspicious 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-CChecks for semicolon on same line as for, if or while statement (rule fully covered)
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V529, V715
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S1116
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
empty-bodyFully checked
 

Related Guidelines

Bibliography

[Hatton 1995]Section 2.7.2, "Errors of Omission and Addition"

...


...

Image Modified Image Modified Image Modified