Closed superm1 closed 4 years ago
FWIW, I don't think Werror=address-of-packed-member makes any sense.
At least reading the thought process behind it in clang:
Taking the address of a packed member is dangerous since the reduced
alignment of the pointee is lost. This can lead to memory alignment
faults in some architectures if the pointer value is dereferenced.
I don't know which architectures behave like that but in general it makes sense to me in that context.
I guess since it's a gcc9 default though, any project which thinks it's fine just needs to suppress those warnings.
Please see my pull request #132 , which resolves this. The warning is appropriate and valid.
I can't believe such a comment I don't think Werror=address-of-packed-member makes any sense
If it makes a sense somewhere, then in a hardware and cross platform environment, such as some unified, run on any hardware and in any situation bootloader.
I found a fedora bug report about grub "sometimes" not booting, because of memory algnment failures. I currently experience the same. I guess that's because of your great code.
But you have been warned. Thank you!
I will fix that bad stuff now and check if that works better.
I can't believe such a comment I don't think
Werror=address-of-packed-member makes any sense
If it makes a sense somewhere, then in a hardware and cross platform environment, such as some unified, run on any hardware and in any situation bootloader. I found a fedora bug report about grub "sometimes" not booting, because of memory algnment failures. I currently experience the same. I guess that's because of your great code. But you have been warned. Thank you! I will fix that bad stuff now and check if that works better.
You can pull #132 and it'll fix it.
FWIW, also happening on Arch Linux, when building the fwupdate package.
This was reported in Debian: