2021-03-16 02:08 AM
Hello!
I just created a fresh project in STM32CubeIDE for STM32L496ZGTxP and included FREERTOS with CubeMX and left everything at its default setting for the time being. After generating the code and compiling, I get 50 compiler warnings. All look somewhat like this:
../Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c:443:64: warning: passing argument 4 of 'osMessageQueuePut' makes integer from pointer without a cast [-Wint-conversion]
443 | (void)osMessageQueuePut(phost->os_event, &phost->os_msg, 0U, NULL);
| ^~~~
| |
| void *
Is it just me who thinks comiler warnings are not to be ignored?
Many Greetings!
Remo
2021-03-16 03:07 AM
> Is it just me who thinks comiler warnings are not to be ignored?
I would agree. Especially with the kind of warning showed (implicit pointer-to-integer).
Since it's ST code, it speaks about quality, extend of testing, and robustness.
Ok for prototypes and hobbyists, but not fit for commercial use.
My company uses to implement a PC-Lint run as second pass for our safety-related projects, that makes such warnings to errors.
2021-03-16 03:24 AM
Is it ST's code, or is it Amazon's (FreeRTOS) ?
2021-03-16 01:30 PM
osStatus_t osMessageQueuePut(osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout);
If someone passes NULL for a parameter with data type uint32_t, then it says something about that developer. Or to be more precise, it actually says everything...
2021-10-19 05:06 AM
This parameter is ignored, but to be honest, NULL have to be replaced with osPriorityNone.