mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: ignore -Wcast-align in virNetlinkDumpCommand
Similar to commitb202c39
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))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (cherry picked from commit04be4111d9
)
This commit is contained in:
parent
0a1c9b6345
commit
c1b4e0f31d
@ -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