Skip to content

Commit

Permalink
af_unix: add comment about cast
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 23, 2021
1 parent fb54db2 commit 8af9b5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lxc/af_unix.c
Expand Up @@ -201,6 +201,12 @@ static ssize_t lxc_abstract_unix_recv_fds_iov(int fd,
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
__u32 idx;
/*
* This causes some compilers to complaing about
* increased alignment requirements but I haven't found
* a better way to deal with this yet. Suggestions
* welcome!
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
int *fds_raw = (int *)CMSG_DATA(cmsg);
Expand Down

0 comments on commit 8af9b5d

Please sign in to comment.