Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
14.1 There shall be no unreachable code
#10
Hi Frank,

Dead code is simply code that is executed, but which is not needed as it does not affect program output. For example:

Code:
int32_t x

x = 12;   // This is dead code, as the assigned value is never used.
x = 15;
use ( x );

Dead code (although not covered by this rule) indicates a possible error in the code. e.g. was the dead code above supposed to initialise some other object?


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)