instead of 
  T_value = ...;
  break;
}
return T_value;

simply call
  return ...;
inside the loop. 

There's a bug here, though: what happens if you never enter the if-statement in the loop? You will return an uninitialized T_values in that case...