criu/compel
Kirill Kolyshkin 20a460fabf Silence clang-4 warning about unaligned pointer
This is what we have:
> compel/src/lib/infect.c:1145:38: error: taking address of packed member
> 'uc_sigmask' of class or structure 'ucontext_ia32' may result in an
> unaligned pointer value [-Werror,-Waddress-of-packed-member]
>         blk_sigset = RT_SIGFRAME_UC_SIGMASK(f);
>                      ~~~~~~~~~~~~~~~~~~~~~~~^~
> compel/include/uapi/asm/sigframe.h:133:4: note: expanded from macro
> 'RT_SIGFRAME_UC_SIGMASK'
>         (&rt_sigframe->compat.uc.uc_sigmask))
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.

Indeed this results in an unaligned pointer, but as this is intended and
well known (see commit dd6736bd "compel/x86/compat: pack ucontext_ia32"),
we need to silence the warning here.

For more details, see https://reviews.llvm.org/D20561

Originally found by Travis on Alpine Linux, reproduced on Ubuntu 17.10.

[v2: fix for non-x86]

Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:10 +03:00
..
arch Silence clang-4 warning about unaligned pointer 2017-10-17 08:40:10 +03:00
include compel: Add more arguments to compel_wait_task() 2017-05-10 04:26:56 +03:00
plugins s390: Move -msoft-float/-fno-optimize-sibling-calls into compel Makefiles 2017-08-09 18:51:41 +03:00
src Silence clang-4 warning about unaligned pointer 2017-10-17 08:40:10 +03:00
test compel/test: fix "infect" test compilation errors 2017-09-21 01:00:23 +03:00
.gitignore compel: adapt .gitgnore for aarch64 and ppc64le 2017-08-09 18:51:42 +03:00
compel-host compel cli: show includes 2017-03-15 00:09:55 +03:00
Makefile s390: Move -msoft-float/-fno-optimize-sibling-calls into compel Makefiles 2017-08-09 18:51:41 +03:00