mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: ignore -Wcast-align in virNetlinkDumpCommand
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)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
079832103c
commit
04be4111d9
@ -361,8 +361,9 @@ virNetlinkDumpCommand(struct nl_msg *nl_msg,
|
|||||||
|
|
||||||
while (!end) {
|
while (!end) {
|
||||||
len = nl_recv(nlhandle, &nladdr, (unsigned char **)&resp, NULL);
|
len = nl_recv(nlhandle, &nladdr, (unsigned char **)&resp, NULL);
|
||||||
|
VIR_WARNINGS_NO_CAST_ALIGN
|
||||||
for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) {
|
for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) {
|
||||||
|
VIR_WARNINGS_RESET
|
||||||
if (msg->nlmsg_type == NLMSG_DONE)
|
if (msg->nlmsg_type == NLMSG_DONE)
|
||||||
end = true;
|
end = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user