summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 21:31:50 +0000
committerkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 21:31:50 +0000
commit59ba0417421dd13cdcd87f029df5b98776bd6808 (patch)
treec831685dc7936512de7b3b5df0a0fb91b3786524
parentf702471eda4238af4e59a7a4f16f898ec9cf728f (diff)
downloadchromium_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.h2
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