]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Data type casting added to fix warnings
authorMichal Horn <hornmich@fel.cvut.cz>
Mon, 20 Oct 2014 12:57:37 +0000 (14:57 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Mon, 20 Oct 2014 12:57:37 +0000 (14:57 +0200)
FreeRTOS before the 8.0.0 version have a xTaskCreate function
with task name parameter of type const signed char*. So the name has
to be casted to this type to avoid warnings.

There is used a macro for it, because we might want to use different
versions of the FreeRTOS, which have different data type for the name
parameter.

Look for the FREERTOS_TASK_NAME definition in os/os.h file.

This commit refs: #1021

Signed-off-by: Michal Horn <hornmich@fel.cvut.cz>
src/arch/sys_arch.c

index 726e2dd77dd7bfb9f20318c0d9bd102dfd5819d7..70d5f2212d488142527054833c12ecd3b07803cd 100644 (file)
@@ -168,7 +168,7 @@ void sys_mbox_free(sys_mbox_t *mbox)
 sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
 {
        xTaskHandle *pvCreatedTask = NULL;
-       if(xTaskCreate(thread, (const signed char *) name, (unsigned short)stacksize, arg, prio, pvCreatedTask) != pdPASS)
+       if(xTaskCreate(thread, FREERTOS_TASK_NAME(name), (unsigned short)stacksize, arg, prio, pvCreatedTask) != pdPASS)
                return NULL; /* lwIP doesn't specify, how should be informed that thread creation failed */
        return pvCreatedTask;
 }