From e91afbabec3b7c891b464efd221748edaba3c2bc Mon Sep 17 00:00:00 2001 From: Wei Li Date: Tue, 22 Mar 2016 19:19:01 -0700 Subject: Re-enable MSVC warning 4702 BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1821423002 . --- third_party/base/logging.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'third_party') 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 #include -#define CHECK(condition) \ - if (!(condition)) { \ - abort(); \ - *(reinterpret_cast(NULL) + 42) = 0x42; \ +#ifndef _WIN32 +#define NULL_DEREF_IF_POSSIBLE \ + *(reinterpret_cast(NULL) + 42) = 0x42; +#else +#define NULL_DEREF_IF_POSSIBLE +#endif + +#define CHECK(condition) \ + if (!(condition)) { \ + abort(); \ + NULL_DEREF_IF_POSSIBLE \ } #define NOTREACHED() assert(false) -- cgit v1.2.3