[libvirt] [PATCH 1/2] util: ignore -Wcast-align in virNetlinkDumpCommand

Andrea Bolognani abologna at redhat.com
Tue Apr 4 12:13:40 UTC 2017


On Tue, 2017-04-04 at 12:57 +0200, Ján Tomko wrote:
> Similar to commit b202c39 ignore the warning that breaks the build
> with clang:
> util/virnetlink.c:365:52: error: cast from 'char *' to 'struct nlmsghdr *'
>  increases required alignment from 1 to 4 [-Werror,-Wcast-align]
>         for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) {
>                                                    ^~~~~~~~~~~~~~~~~~~~
> /usr/include/linux/netlink.h:87:7: note: expanded from macro 'NLMSG_NEXT'
>          (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ACK

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list