Commit a95939c0 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

zombie00 test: fix for clang

CLang doesn't like explicit NULL pointer dereference:

> zombie00.c:52:5: error: indirection of non-volatile null pointer will be
> deleted, not trap [-Werror,-Wnull-dereference]
>                                 *(int *)NULL = 0;
>                                 ^~~~~~~~~~~~
> zombie00.c:52:5: note: consider using __builtin_trap() or qualifying
> pointer with 'volatile'
> 1 error generated.

Apparently, we need to add volatile to make it happy.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 3c75cf51
...@@ -49,7 +49,7 @@ int main(int argc, char ** argv) ...@@ -49,7 +49,7 @@ int main(int argc, char ** argv)
if (zombie[i].exited) if (zombie[i].exited)
_exit(zombie[i].exitcode); _exit(zombie[i].exitcode);
else if (zombie[i].exitcode == SIGSEGV) else if (zombie[i].exitcode == SIGSEGV)
*(int *)NULL = 0; *(volatile int *)NULL = 0;
else else
kill(getpid(), zombie[i].exitcode); kill(getpid(), zombie[i].exitcode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment