summaryrefslogtreecommitdiff
path: root/third_party/base
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-22 19:19:01 -0700
committerWei Li <weili@chromium.org>2016-03-22 19:19:01 -0700
commite91afbabec3b7c891b464efd221748edaba3c2bc (patch)
treea1f0cbd94320b43b1f0e949ee91b15367156a0a2 /third_party/base
parent0ac525005e15a6a67b04e8ab1553f4a1e18b0da7 (diff)
downloadpdfium-e91afbabec3b7c891b464efd221748edaba3c2bc.tar.xz
Re-enable MSVC warning 4702
BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1821423002 .
Diffstat (limited to 'third_party/base')
-rw-r--r--third_party/base/logging.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/third_party/base/logging.h b/third_party/base/logging.h
index 98ed9c5da0..bf4faea57e 100644
--- a/third_party/base/logging.h
+++ b/third_party/base/logging.h
@@ -8,10 +8,17 @@
#include <assert.h>
#include <stdlib.h>
-#define CHECK(condition) \
- if (!(condition)) { \
- abort(); \
- *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42; \
+#ifndef _WIN32
+#define NULL_DEREF_IF_POSSIBLE \
+ *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42;
+#else
+#define NULL_DEREF_IF_POSSIBLE
+#endif
+
+#define CHECK(condition) \
+ if (!(condition)) { \
+ abort(); \
+ NULL_DEREF_IF_POSSIBLE \
}
#define NOTREACHED() assert(false)