diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2023-02-13 15:50:07 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2023-02-13 15:50:07 +0000 |
commit | f645ca647f98fec6f7f642e4bb9dfa319f17f212 (patch) | |
tree | af8c5fe51dea12c6b5a49dd44db3c21a4135422e /usr.sbin | |
parent | e581c5f98f49311e2ad9233319e8839e474777d0 (diff) |
Fix an alignment issue in iwx(4) Rx descriptors.
Split a 64-bit field, aligned at a 4-byte boundary, into two 32 bit fields.
Our driver does not use this field. Its definition does not matter to us,
as long as its size remains correct.
Fixes clang-15 warnings, which turn into compilation errors with -Werror.
Reported by, and ok tb@
Relevant clang 15 errors are:
In file included from /sys/dev/pci/if_iwx.c:151:
/sys/dev/pci/if_iwxreg.h:3659:2: error: field within 'struct iwx_rx_mpdu_desc_v1' is less aligned than 'union iwx_rx_mpdu_desc_v1::(anonymous at /sys/dev/pci/if_iwxreg.h:3659:2)' and is usually due to 'struct iwx_rx_mpdu_desc_v1' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
union {
^
/sys/dev/pci/if_iwxreg.h:3626:2: error: field within 'struct iwx_rx_mpdu_desc_v3' is less aligned than 'union iwx_rx_mpdu_desc_v3::(anonymous at /sys/dev/pci/if_iwxreg.h:3626:2)' and is usually due to 'struct iwx_rx_mpdu_desc_v3' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
union {
^
2 errors generated.
Diffstat (limited to 'usr.sbin')
0 files changed, 0 insertions, 0 deletions