Re: alignment and packed structs

2021-01-06 Thread RVP
On Wed, 6 Jan 2021, Patrick Welche wrote: I just tried to compile if_iwn as a module. It failed with dev/pci/if_iwn.c:2685:6: error: converting a packed 'struct iwn_fw_dump' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer val

alignment and packed structs

2021-01-06 Thread Patrick Welche
I just tried to compile if_iwn as a module. It failed with dev/pci/if_iwn.c:2685:6: error: converting a packed 'struct iwn_fw_dump' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Werror=address-of-packed-member] I got