Unreachable Statement


Unreachable statement” occurs when a statement is written in a place that prevents it from being executed. Usually, this is after a break or return statement.
for(;;){
   break;
   ... // unreachable statement
}
int i=1;
if(i==1)
  ...
else
  ... // dead code

Often simply moving the return statement will fix the error.