mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 07:15:31 +00:00
maps007 test: fix for clang
CLang doesn't like explicit NULL pointer dereference: > maps007.c:176:2: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] > *((int *) 0) = 0; > ^~~~~~~~~~~~ > maps007.c:176:2: note: consider using __builtin_trap() or qualifying pointer with 'volatile' > Apparently, we need to add volatile to make it happy. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
2ac1cc67a5
commit
f18fce45a2
@@ -173,6 +173,6 @@ int main(int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
kill(child, SIGSEGV);
|
kill(child, SIGSEGV);
|
||||||
*((int *) 0) = 0;
|
*((volatile int *) 0) = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user