2024-01-29 12:16 AM - last edited on 2025-04-06 1:40 PM by STTwo-32
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 6: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
2025-04-06 1:39 PM
Hello @AFink
Di you have the same working using the STM32CubeWB V1.22.0, the STM32CubeMX V6.14.0 and the STM32CubeIDE V1.18.0
PS: this warning should not be the source of any issue.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.