From 6dde2373d7c290f238b2d6a4c7320a2b39ad444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 13 Mar 2012 17:32:44 +0100 Subject: [PATCH] Make MSVC shut up when compiling protobuf. Disabled planty of common harmless warnings. --- depends/protobuf/google/protobuf/stubs/common.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/depends/protobuf/google/protobuf/stubs/common.h b/depends/protobuf/google/protobuf/stubs/common.h index 832973574..60187f28b 100644 --- a/depends/protobuf/google/protobuf/stubs/common.h +++ b/depends/protobuf/google/protobuf/stubs/common.h @@ -48,6 +48,22 @@ #include #endif +// make MSVC shut up about some things +#ifdef _MSC_VER + // don't spew nonsense! + #pragma warning( disable: 4251 ) + // POSIX is OK, stop complaining. + #pragma warning( disable: 4996 ) + // using 'this' in initializer lists... + #pragma warning( disable: 4355 ) + // signed/unsigned mismatch + #pragma warning( disable: 4018 ) + // possible loss of data from assignments between different numeric types + #pragma warning( disable: 4244 ) + // forcing value to 'bool' + #pragma warning( disable: 4800 ) +#endif + #if defined(_MSC_VER) && defined(_CPPUNWIND) #define PROTOBUF_USE_EXCEPTIONS #elif defined(__EXCEPTIONS)