I get a compiler warning referring to the “switch (group)” line below.
“main.c:262:warning 110: conditional flow changed by optomizer: so said EVELYN to the modified DOG”
Here is my code
unsigned char group;//used for switch statement
void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam
{
unsigned char stored_pin;
void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam
if (pin_value == 0){// only react when switch is pressed
if ((pin >= 1) && (pin <= 5))
group = 1;
if (pin == 7)
group = 2;
more code
switch (group)
{case (1) :{
{
stored_pin = memory_group_stored_pin;// change value of stored pin to the memory group stored value
stored_pin = SetLed_NoDump(1, 5, 9,stored_pin, pin, pin_value); //function, set pin_low to 0, pin_high to 5, canc_pin to 9
memory_group_stored_pin = stored_pin;//resets the variable for this group to the current stored pin after the function above.
}
break;
//////////Record (Used with Memory Group) ///////
case (2) :
{
stored_pin = record_button_state;// change value of stored pin to the memory group stored value
stored_pin = SetLed_NoDump( 6, 6, 7,stored_pin, pin, pin_value);//see case 1 with pins changed
record_button_state = stored_pin;//resets the variable for this group to the current stored pin after the function above.
}
break;
I have had these warnings before and have solved them usually by supplying missing brackets.
After a long seach on the web and can’t find any useful reference to the statement.
Also there must be a list of errors and warnings listed somewhere.
Perhaps someone can point out the cause of the warning and point me to a source of error codes and warnings.
Thank you.
Robin