From 50c0bcd7e36374d6c3d0359c2160d8493e67527e Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 6 Apr 2018 10:15:00 -0400 Subject: Cont. deal with MCVS warnings --- googlemock/include/gmock/gmock-more-matchers.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'googlemock/include/gmock/gmock-more-matchers.h') 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_ -- cgit v1.2.3 From 2d4d4ef7392bc577449ade669b282853cb7adb39 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 6 Apr 2018 16:31:11 -0400 Subject: fixing MSVC --- googlemock/include/gmock/gmock-more-matchers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'googlemock/include/gmock/gmock-more-matchers.h') diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index 4c248325..6d810eb7 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -49,6 +49,8 @@ namespace testing { # pragma warning(push) # pragma warning(disable:4100) #if (_MSC_VER == 1900) +// and silence C4800 (C4800: 'int *const ': forcing value +// to bool 'true' or 'false') for MSVC 14 # pragma warning(disable:4800) #endif #endif -- cgit v1.2.3