Closed armandas closed 11 months ago
This issue is present in code generated by CubeMX 6.6.1.
The following lines all pass NULL to the uint8_t msg_prio parameter, causing a compiler warning:
NULL
uint8_t msg_prio
warning: passing argument 3 of 'osMessageQueuePut' makes integer from pointer without a cast [-Wint-conversion]
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L615
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L637
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L650
The issue may be due to some copy-paste programming. The osMessageQueueGet API does take a pointer:
osMessageQueueGet
osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout)
but osMessageQueuePut takes the msg_prio by value:
osMessageQueuePut
msg_prio
osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout)
ST Internal Reference: 97597
This issue is present in code generated by CubeMX 6.6.1.
The following lines all pass
NULL
to theuint8_t msg_prio
parameter, causing a compiler warning:warning: passing argument 3 of 'osMessageQueuePut' makes integer from pointer without a cast [-Wint-conversion]
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L615
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L637
https://github.com/STMicroelectronics/stm32_mw_fatfs/blob/5042a94556d1c4477642fc6b09450725d18ab5e8/src/drivers/sd_diskio_dma_rtos_template_bspv2.c#L650
The issue may be due to some copy-paste programming. The
osMessageQueueGet
API does take a pointer:but
osMessageQueuePut
takes themsg_prio
by value: