freebsd-dev/sys/dev/bwi
Dimitry Andric 09d0a0fbe8 bwi: Fix clang 14 warning about possible unaligned access
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
2022-02-13 14:35:58 +01:00
..
bitops.h
bwimac.c bwi: clean up empty lines in .c and .h files 2020-09-01 21:43:36 +00:00
bwimac.h
bwiphy.c bwi: clean up empty lines in .c and .h files 2020-09-01 21:43:36 +00:00
bwiphy.h
bwirf.c bwi: clean up empty lines in .c and .h files 2020-09-01 21:43:36 +00:00
bwirf.h
if_bwi_pci.c bwi: clean up empty lines in .c and .h files 2020-09-01 21:43:36 +00:00
if_bwi.c WiFi: fix ieee80211_media_change() callers 2020-09-07 15:35:40 +00:00
if_bwireg.h bwi: clean up empty lines in .c and .h files 2020-09-01 21:43:36 +00:00
if_bwivar.h bwi: Fix clang 14 warning about possible unaligned access 2022-02-13 14:35:58 +01:00