2024-01-29 12:16 AM
Hi,
I'm working with STM32_WPAN package (attached), on STM32CubeIDE (gcc compiler).
MCU: STM32WB55
There's a Compilation Warning that I don't know how to deal:
converting a packed 'TL_EvtPacket_t' pointer (alignment 1) to a 'tListNode' {aka 'struct _tListNode'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member].
Can you please help me fixing this Warning?
Thanks,
Aviv
2024-01-30 12:21 AM
Hi Aviv,
this warning is more likely a serious issue:
Is this code coming from a working project/repository?
What is this "PACKED_STRUCT"? This seems to cause the warning:
What does it tell me?:
You might be able to disable alignment warnings. And I think you get it because your "packed" structs are really not aligned. But the code using it could be still OK (depends how the struct members are used at the end).
2024-01-31 06:51 AM
Hi tjaekel,
thanks for your reply.
Actually this code is from ST's STM32_WPAN package. So, I have no clue whether it handles the mis-alignment correctly (I'd like to believe it does...).
I was hoping that some ST guy can tell how to solve this Warning. I rather solving it rather than discarding the Warning in compiler.
Thanks,
Aviv