mirror of
https://github.com/opnsense/src.git
synced 2026-05-13 09:44:52 -04:00
On architectures with strict alignment requirements (e.g. arm), clang 14
warns about a packed struct which encloses a non-packed union:
In file included from sys/dev/bwi/bwimac.c:79:
sys/dev/bwi/if_bwivar.h:308:7: error: field iv_val within 'struct bwi_fw_iv' is less aligned than 'union (unnamed union at sys/dev/bwi/if_bwivar.h:305:2)' and is usually due to 'struct bwi_fw_iv' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
} iv_val;
^
It appears to help if you also add __packed to the inner union (i.e.
iv_val). No change to the layout is intended.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34196
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| bitops.h | ||
| bwimac.c | ||
| bwimac.h | ||
| bwiphy.c | ||
| bwiphy.h | ||
| bwirf.c | ||
| bwirf.h | ||
| if_bwi.c | ||
| if_bwi_pci.c | ||
| if_bwireg.h | ||
| if_bwivar.h | ||