Backend Compiler Warning
Posted: 06 October 2008, 17:50 PM
I've been getting this warning while now (it's not due to the newest compiler release). The application functions properly by all accounts, although the particular function where the warning is coming from is as yet unfinished.
The corrosponding C code does not seem to set the variable at all:
I'm not necessarily concerned about the warning, but for the sake of commenting my code, I'd like to identify the issue, and at the very least make note of it.
-Don
The warning is issued even if the variable is manually given a value immediately after declaration, such as:ModbusTask.c: In function 'zf_ModbusTask':
ModbusTask.c:28: warning: 'zv_DataCount' may be used uninitialized in this function
Code: Select all
Dim I as Integer
Dim BitTIme as Single
Dim AddressField as Byte
Dim OldQCount as Integer
Dim DataCount as Integer
DataCount = 1
Dim CRC as UnsignedInteger
Dim ReceivedCRC as UnsignedInteger
Code: Select all
int16_t zv_I;
float zv_BitTIme;
int16_t zv_OldQCount;
int16_t zv_DataCount;
uint16_t zv_CRC;
uint16_t zv_ReceivedCRC;
-Don