summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-04-05 18:00:14 (GMT)
committerGennadiy Civil <misterg@google.com>2018-04-05 18:00:14 (GMT)
commite0f4cf05614a90133b5912f149c1f59fdaf3aff6 (patch)
tree180365c3d5d96aaa73579be127b886f693298b78 /googlemock
parent7045138a0d4fdc4c3d0bb582c3def9b3cbea9a26 (diff)
downloadgoogletest-e0f4cf05614a90133b5912f149c1f59fdaf3aff6.zip
googletest-e0f4cf05614a90133b5912f149c1f59fdaf3aff6.tar.gz
googletest-e0f4cf05614a90133b5912f149c1f59fdaf3aff6.tar.bz2
fixing MCVS warn
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/include/gmock/gmock-more-matchers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h
index a5a8bfa..85bc3c0 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") {