Type conflicts of xQueueHandle

rickpike wrote on Wednesday, March 18, 2009:

You can modify queue.c to eliminate the warning AND preserve the data hiding.

Change queue.c so that it #includes queue.h. Now all the queue functions use the same typedef that your client code does (xQueueHandle is void*).

Change the typedef in queue.c to something like:
typedef xQUEUE xRealQueueHandle;

Now change all of the functions in queue.c that take an xQueueHandle parameter or return an xQueueHandle and cast the void pointer to xRealQueueHandle.

-rp