The compiler doesn't consider what might happen inside of some if statements. It likes to see, for sure, that a variable has been assigned an initial value before it is used.
Make the compiler happy...