From e0f4cf05614a90133b5912f149c1f59fdaf3aff6 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 5 Apr 2018 14:00:14 -0400 Subject: fixing MCVS warn --- googlemock/include/gmock/gmock-more-matchers.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'googlemock/include') diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index a5a8bfa5..85bc3c02 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -43,6 +43,16 @@ namespace testing { +// The macros trigger warning C4100 (unreferenced formal +// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in +// the macro definition, as the warnings are generated when the macro +// is expanded and macro expansion cannot contain #pragma. Therefore +// we suppress them here. +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4100) +#endif + // Defines a matcher that matches an empty container. The container must // support both size() and empty(), which all STL-like containers provide. MATCHER(IsEmpty, negation ? "isn't empty" : "is empty") { -- cgit v1.2.3