Make the null pointer dereference a volatile one
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 23 Jan 2013 21:29:12 +0000 (13:29 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 29 Jan 2013 00:47:01 +0000 (01:47 +0100)
commitedd2d9bd0a7f5dbe059aea0902d519b728acc01a
tree057b23be57996f15815f74e5a5c97f5143d25bd7
parent2a3d690a195607ee640d84aac762153c8096bf5b
Make the null pointer dereference a volatile one

This is to ensure that the compiler won't optimise it out of existence.
Clang says it will do it:

testProcessCrash/main.cpp:50:5: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
    *(char*)0 = 0;
    ^~~~~~~~~

Change-Id: Iac7771046442f869e205e8789fffdd6443d58e67
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp