Versions Compared

Key

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

Code that is executed but does not perform any action, or has an unintended effect, most likely results from a coding error and can result in unexpected behavior. Statements or expressions that have no effect should be identified and removed from code. Most modern compilers can warn about code that has no effect in many cases. (See recommendation [ MSC00-C. Compile cleanly at high warning levels.)

This recommendation is related to guideline MSC07-C. Detect and remove dead code.

...