]> git.ipfire.org Git - thirdparty/hostap.git/commit
Avoid compiler warning about potentially unaligned pointer value
authorJouni Malinen <j@w1.fi>
Sat, 23 Feb 2019 15:57:23 +0000 (17:57 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 17:48:49 +0000 (19:48 +0200)
commitaaa6b14984a038cf3b63172cb1f2231ab79d1471
treed4521e6004d3f77aebd89012461f8221050447b3
parentcce974d367d41271a26451d663593f6c490aa2b9
Avoid compiler warning about potentially unaligned pointer value

(&mgmt->u.deauth.reason_code + 1) is not exactly clean and now that we
have the u8 variable[] member in the struct after this field, use that
directly to avoid clang compiler warning:
ctrl_iface_ap.c:454:18: error: taking address of packed member
      'reason_code' of class or structure 'ieee80211_mgmt::(anonymous
      union)::(anonymous)' may result in an unaligned pointer value
      [-Werror,-Waddress-of-packed-member]

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ctrl_iface_ap.c