Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: third_party/base/logging.h

Issue 1821423002: Re-enable MSVC warning 4702 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« core/fxcrt/fx_basic_memmgr.cpp ('K') | « pdfium.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/base/logging.h
diff --git a/third_party/base/logging.h b/third_party/base/logging.h
index 98ed9c5da0059d40ccd26d82fd2a0468053da4c9..bf4faea57e08fd9ca75e1b7933327e8cee5612c1 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)
« core/fxcrt/fx_basic_memmgr.cpp ('K') | « pdfium.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698