diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index 01298cfa..4c248325 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -46,6 +46,7 @@ namespace testing { // Silence C4100 (unreferenced formal // parameter) for MSVC #ifdef _MSC_VER +# pragma warning(push) # pragma warning(disable:4100) #if (_MSC_VER == 1900) # pragma warning(disable:4800) @@ -78,6 +79,11 @@ MATCHER(IsFalse, negation ? "is true" : "is false") { return !static_cast(arg); } +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + } // namespace testing #endif // GMOCK_GMOCK_MORE_MATCHERS_H_ diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 030a1d61..85becb5f 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -48,10 +48,12 @@ namespace testing { namespace internal { -// Silence C4100 (unreferenced formal -// parameter) for MSVC +// Silence MSVC C4100 (unreferenced formal parameter) and +// C4805('==': unsafe mix of type 'const int' and type 'const bool') #ifdef _MSC_VER +# pragma warning(push) # pragma warning(disable:4100) +# pragma warning(disable:C4805) #endif // Joins a vector of strings as if they are fields of a tuple; returns @@ -545,6 +547,12 @@ auto Apply(F&& f, Tuple&& args) make_int_pack::value>()); } #endif + + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + } // namespace internal } // namespace testing