Hi,
Can you tell us the part number and the tools you are using? If you use DSC and CodeWarrior for MCU ver11.x, if you do not initialize a variable, the variable maybe any value. Therefore, you have to initialize the variable.
Hope it can help you
BR
Xiangjun Rong