This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSv4 Indirect Function Call warning

void (*FC) (void);

 

void Function (void) {

      __no_operation();

}

 

void *FCaddress = &Function;

 

void Main (void) {

     

      // Direct

      FC = &Function;

     

      //Via a variable

      FC = FCaddress;

     

      FC();

}

 

The above code line ‘FC = FCaddress;’ results in;

warning: a value of type "void *" cannot be assigned to an entity of type "void (*)(void)

The code works fine, how to avoid this warning?