From 8af9b5dadb2ac2c897f976def905b1e88e5daf5f Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 23 Feb 2021 19:00:42 +0100 Subject: [PATCH] af_unix: add comment about cast Signed-off-by: Christian Brauner --- src/lxc/af_unix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c index 1777f5218..526e38ad0 100644 --- a/src/lxc/af_unix.c +++ b/src/lxc/af_unix.c @@ -201,6 +201,12 @@ again: 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); -- 2.39.5