Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MSC12-EX3 to address library code & ifdefs

...

Anchor
MSC12-EX2
MSC12-EX2
MSC12-EX2: It is permissible to temporarily remove code that may be needed later. (See MSC04-C. Use comments consistently and in a readable fashion for an illustration.)

Anchor
MSC12-EX3
MSC12-EX3
MSC12-EX3: Unused functions and variables that are part of an exported library do not violate this guideline.  Likewise, code that is never executed because it is #ifdeffed out does not violate this guideline, on the grounds that it could be subsequently used in another application, or built on a different platform.

Risk Assessment

The presence of code that has no effect or is never executed can indicate logic errors that may result in unexpected behavior and vulnerabilities. Such code can be introduced into programs in a variety of ways and eliminating it can require significant analysis.

...