cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CUBE IDE FreeRTOS cmsis_os.h:461:67: warning: ISO C++ forbids converting a string constant to 'char*'

MBel.1
Associate

When freeRTOS header cmsis_os.h is used in *.cpp file, it generates compiler warning

ISO C++ forbids converting a string constant to 'char*'.

Proposed fix:

Change line 326 of cmsis_os.h from:

typedef struct os_thread_def {

 char                  *name;       ///< Thread name

to:

typedef struct os_thread_def {

const char            *name;       ///< Thread name

0 REPLIES 0