diff options
author | kaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 21:31:50 +0000 |
---|---|---|
committer | kaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 21:31:50 +0000 |
commit | 59ba0417421dd13cdcd87f029df5b98776bd6808 (patch) | |
tree | c831685dc7936512de7b3b5df0a0fb91b3786524 | |
parent | f702471eda4238af4e59a7a4f16f898ec9cf728f (diff) | |
download | chromium_src-59ba0417421dd13cdcd87f029df5b98776bd6808.zip chromium_src-59ba0417421dd13cdcd87f029df5b98776bd6808.tar.gz chromium_src-59ba0417421dd13cdcd87f029df5b98776bd6808.tar.bz2 |
Write to NULL will trigger a Clang compile warning and the compiler may
optimize and turn it into a non-op.
int* -> volatile int* to fix this.
BUG=127724
Review URL: https://chromiumcodereview.appspot.com/10392109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137251 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | third_party/tcmalloc/chromium/src/base/abort.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/tcmalloc/chromium/src/base/abort.h b/third_party/tcmalloc/chromium/src/base/abort.h index ce3136e..11bb967 100644 --- a/third_party/tcmalloc/chromium/src/base/abort.h +++ b/third_party/tcmalloc/chromium/src/base/abort.h @@ -25,7 +25,7 @@ inline void Abort() { namespace tcmalloc { inline void Abort() { // Make a segmentation fault to force abort. - *reinterpret_cast<int*>(NULL) = 0x2001; + *reinterpret_cast<volatile int*>(NULL) = 0x2001; } } // namespace tcmalloc |