Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: xref MSC12

Code that is never executed is known as dead code. Typically, the presence of dead code indicates that a logic error has occurred as a result of changes to a program or the program's environment. Dead code is usually optimized out of a program during compilation. However, to improve readability and ensure that logic errors are resolved, dead code should be identified, understood, and removed from a program.

Wiki Markup
For a related recommendation, please see \[[MSC07-A. Detect and remove dead code]\].

Non-Compliant Code Example

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MSC07-A

1 ( low ) 1 (

unlikely )

1 ( high )

P1

L3

Automated Detection

The LDRA tool suite V 7.6.0 is able to detect violations of this recommendation.

...