Commit 9575d1c7 authored by Daniel Stone's avatar Daniel Stone

tests: Use volatile pointer for NULL dereference

Clang warns that it can silently discard a non-volatile write to a NULL
pointer (perhaps it constitutes undefined behaviour?), and recommends
changing it to volatile.

This patch slavishly complies with the demand of the unfeeling machine.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 4939923d
......@@ -70,8 +70,10 @@ FAIL_TEST(fail_kill)
FAIL_TEST(fail_segv)
{
char * volatile *null = 0;
test_disable_coredumps();
* (char **) 0 = "Goodbye, world";
*null = "Goodbye, world";
}
FAIL_TEST(sanity_assert)
......
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