http-parser: Disable MSVC warnings locally
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/deps/http-parser/http_parser.h b/deps/http-parser/http_parser.h
index 69f67eb..ac00d41 100644
--- a/deps/http-parser/http_parser.h
+++ b/deps/http-parser/http_parser.h
@@ -27,6 +27,11 @@ extern "C" {
#define HTTP_PARSER_VERSION_MAJOR 1
#define HTTP_PARSER_VERSION_MINOR 0
+#ifdef _MSC_VER
+ /* disable silly warnings */
+# pragma warning(disable: 4127 4214)
+#endif
+
#include <sys/types.h>
#if defined(_WIN32) && !defined(__MINGW32__) && !defined(_MSC_VER)
typedef __int8 int8_t;
diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h
index 2211de5..64ed184 100644
--- a/src/win32/msvc-compat.h
+++ b/src/win32/msvc-compat.h
@@ -9,16 +9,6 @@
#if defined(_MSC_VER)
-/*
- * Disable silly MSVC warnings
- */
-
-/* conditional expression is constant */
-#pragma warning(disable: 4127)
-
-/* nonstandard extension used : bit field types other than int */
-#pragma warning(disable: 4214)
-
/* access() mode parameter #defines */
# define F_OK 0 /* existence check */
# define W_OK 2 /* write mode check */