signed portCHAR for strings, why?

nunterberg wrote on Thursday, March 11, 2010:

Hi,
I wonder why FreeRTOS is using “signed portCHAR” as data type for C-strings in its public API. Since the type of a string literal in C is “char*” and not “signed char*”, my gcc complains when I use a string literal as xTaskCreate or a normal char buffer for vTaskList.

I changed these text string APIs from using signed portCHAR* to just portChar* in my copy of ReeRTOS, and my warnings are gone.

Thank you
Norbert

rtel wrote on Thursday, March 11, 2010:

There is a lot of casting and qualification (such as the signed in this case) in FreeRTOS that does not seem to have an obvious reason if you are just using one port.  This arises because FreeRTOS is compiled with so many different compilers - some of which issue contradicting warning messages so you can’t win.

With regard to the char casting, if warnings are generated then you can re-cast in the application code.  Not ideal I know.

Regards.