FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2010 Threads] signed portCHAR for strings, why?Posted by Norbert Unterberg on 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
RE: signed portCHAR for strings, why?Posted by Richard on 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|