Versions Compared

Key

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

...

Code Block
bgColor#FFCCCC
int x = 1;
 
if (x == 1){
	return x;
	x += 1; // Code here is unreachable, never executed 
}

Any code The statement following the return statement will never get executed thus created errors and bugs in the program which rely on that statement.

Compliant Solution

In this compliant solution with reachable code.

...