Cast increases required alignment of target type

Hi
I am using freeRTOS 10.4.3 version with GCC version 9.3.1 and GCC version 10.3.1
In stream_buffer.c I get the following warning:
Cast increases required alignment of target type on the following line

 prvInitialiseNewStreamBuffer( ( StreamBuffer_t * ) pucAllocatedMemory,       /* Structure at the start of the allocated memory. */ /*lint !e9087 Safe cast as allocated memory is aligned. */ /*lint !e826 Area is not too small and alignment is guaranteed provided malloc() behaves as expected and returns aligned buffer. */
                                          pucAllocatedMemory + sizeof( StreamBuffer_t ), /* Storage area follows. */ /*lint !e9016 Indexing past structure valid for uint8_t pointer, also storage area has no alignment requirement. */
                                          xBufferSizeBytes,
                                          xTriggerLevelBytes,
                                          ucFlags );

Any Idea ?

What compiler options are you using? Possible for you to share the project that we can use to repro this?

Hi
I use this compiler flag Warning (-Wcast-align)

Which chip architecture are you using?

I’m using STM32G0B1RE MCU, based on cortex m0 plus core

This PR addresses this - Fix cast alignment warning by aggarg · Pull Request #669 · FreeRTOS/FreeRTOS-Kernel · GitHub

Hi
Thank you I’ll update my code