HomeFreeBSD

MFC r311811:

Description

MFC r311811:

Avoid taking the address of a packed struct member in mfiutil

Fix a clang 4.0.0 warning about taking the address of a packed member of
struct mfi_evt in mfiutil:

usr.sbin/mfiutil/mfi_evt.c:583:30: error: taking address of packed
member 'members' of class or structure 'mfi_evt' may result in an
unaligned pointer value [-Werror,-Waddress-of-packed-member]
                        if (parse_locale(optarg, &filter.members.locale) < 0) {
                                                  ^~~~~~~~~~~~~~~~~~~~~

Use a local variable instead, and copy that into the struct.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D9069

Details

Provenance
dimAuthored on
Reviewer
jhb
Differential Revision
D9069: Avoid taking the address of a packed struct member in mfiutil
Parents
rS312767: Partially workaround ASMedia HBA error recovery.
Branches
Unknown
Tags
Unknown