Re-enable MSVC warning 4702

BUG=pdfium:29
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1821423002 .
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index 97a3d4d..351df60 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -1052,12 +1052,13 @@
       return 0;
     }
     return unicode;
-#endif
+#else
     if (m_pCMap->m_pEmbedMap) {
       return EmbeddedUnicodeFromCharcode(m_pCMap->m_pEmbedMap,
                                          m_pCMap->m_Charset, charcode);
     }
     return 0;
+#endif
   }
   return m_pCID2UnicodeMap->UnicodeFromCID(CIDFromCharCode(charcode));
 }
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
index 92532d7..f1a566a 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -96,10 +96,9 @@
       pGRD->Continue_decode(pPause);
     }
     if (!GSPLANES.get()[J]) {
-      for (int32_t K = GSBPP - 1; K > J; --K) {
+      for (int32_t K = GSBPP - 1; K > J; --K)
         delete GSPLANES.get()[K];
-        return nullptr;
-      }
+      return nullptr;
     }
     pStream->alignByte();
     pStream->offset(3);
diff --git a/core/fxcrt/fx_basic_memmgr.cpp b/core/fxcrt/fx_basic_memmgr.cpp
index a0af6ae..1cbd293 100644
--- a/core/fxcrt/fx_basic_memmgr.cpp
+++ b/core/fxcrt/fx_basic_memmgr.cpp
@@ -21,5 +21,7 @@
 NEVER_INLINE void FX_OutOfMemoryTerminate() {
   // Termimate cleanly if we can, else crash at a specific address (0xbd).
   abort();
+#ifndef _WIN32
   reinterpret_cast<void (*)()>(0xbd)();
+#endif
 }
diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp
index 210e6f1..9335800 100644
--- a/core/fxge/dib/fx_dib_convert.cpp
+++ b/core/fxge/dib/fx_dib_convert.cpp
@@ -949,7 +949,6 @@
     default:
       return FALSE;
   }
-  return FALSE;
 }
 CFX_DIBitmap* CFX_DIBSource::CloneConvert(FXDIB_Format dest_format,
                                           const FX_RECT* pClip,
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index e530797..cee81da 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -144,8 +144,6 @@
     default:
       return 0;
   }
-
-  return 0;
 }
 
 CPDFXFA_Page* CPDFXFA_Document::GetPage(int page_index) {
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp
index 89638c0..8c97763 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp
@@ -102,8 +102,6 @@
     default:
       return FALSE;
   }
-
-  return FALSE;
 }
 
 FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) {
diff --git a/fpdfsdk/javascript/JS_EventHandler.cpp b/fpdfsdk/javascript/JS_EventHandler.cpp
index 697cfeb..0dffa7d 100644
--- a/fpdfsdk/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/javascript/JS_EventHandler.cpp
@@ -514,8 +514,6 @@
     default:
       return L"";
   }
-
-  return L"";
 }
 
 const FX_WCHAR* CJS_EventHandler::Type() {
@@ -571,8 +569,6 @@
     default:
       return L"";
   }
-
-  return L"";
 }
 
 FX_BOOL& CJS_EventHandler::Rc() {
diff --git a/pdfium.gyp b/pdfium.gyp
index a5a70a8..f43f58d 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -95,8 +95,6 @@
     ],
     'msvs_disabled_warnings': [
       4005, 4018, 4146, 4333, 4345, 4267,
-      # TODO(thestig): Fix all instances, remove this, pdfium:29
-      4702,
     ],
     'variables': {
       'clang_warning_flags': [
diff --git a/third_party/base/logging.h b/third_party/base/logging.h
index 98ed9c5..bf4faea 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)