AnsweredAssumed Answered

CMSIS-RTOS RTX Version 4.74 osThreadID function compiling warning #144-D

Question asked by wei.jim.001 on Jan 14, 2014
Latest reply on Jan 14, 2014 by sung.chen_chung
Hello,

I am using STM32F4 Discovery board, uVision V5.1.0.0 development environment which comes with CMSIS-RTOS RTX  Version 4.74.  In the document for this version of CMSIS-RTOS RTX, the following  code example is given:

void threadX (voidconst *argument);
/* Thread IDs */
osThreadId main_id;
osThreadId threadX_id;
/* Thread definitions */
osThreadDef(threadX, osPriorityNormal, 1, 0);

However, when I compile my code:

void sine_gen(void);
osThreadDef (sine_gen, osPriorityAboveNormal, 1, 0);

The following warning message poped up:

src\DirtyFilter.c(76): warning:  #144-D: a value of type "void (*)(void)" cannot be used to initialize an entity of type "os_pthread" osThreadDef (sine_gen, osPriorityAboveNormal, 1, 0);

I don't understand it.  Could anyone please help to explain?  Thanks in advance.

Jim




Outcomes