error compilation with dspic33F

john264 wrote on Monday, August 30, 2010:

when i compile my project i have this warning:

warning: passing argument 1 of ‘xTaskGenericCreate’ from incompatible pointer type

does someone has got already this warning. i think it is a  bug with compiler C30 on
MPLAB. Does someone can help me?
Best regards

davedoors wrote on Monday, August 30, 2010:

The first parameter is a function pointer, what is the prototype of the function being pointed to?

richard_damon wrote on Monday, August 30, 2010:

The task function passed as the first parameter MUST be defined as “void fun(void *arg)” or you will get an error/warning.If the task wants the argument to be of a different type, it should change it inside the function. Using a different type of pointer may “work” as all pointers “look” the same on most machines now a days (including the dspic series), but it is a violation of the C standard as it is NOT true for all machines. in particular, machines which use “word” addressing instead of byte addressing.

john264 wrote on Monday, August 30, 2010:

Thanks a lot for your answer. i have found the pb  and i have done mistake when i pass argument…
best regards