From 5388473acfb6c75dab2236ad425980ffa4bf4b39 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 13 Feb 2019 09:45:53 -0800 Subject: Fix clang `-Winconsistent-missing-override` warnings `DescribeTo(..)` and `MatchAndExplain(..)` in `gmock-matchers_test` both override virtual methods. Remove the `virtual` keyword and apply `override` to them instead. Signed-off-by: Enji Cooper --- googlemock/test/gmock-matchers_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'googlemock') diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index cdca2300..b586d276 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -6943,10 +6943,10 @@ TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) { // For testing Args<>'s explanation. class LessThanMatcher : public MatcherInterface > { public: - virtual void DescribeTo(::std::ostream* os) const {} + void DescribeTo(::std::ostream* os) const override {} - virtual bool MatchAndExplain(std::tuple value, - MatchResultListener* listener) const { + bool MatchAndExplain(std::tuple value, + MatchResultListener* listener) const override { const int diff = std::get<0>(value) - std::get<1>(value); if (diff > 0) { *listener << "where the first value is " << diff -- cgit v1.2.3 From 1c22797cd3046a9fb74dc49268ac18ab86c14568 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 13 Feb 2019 10:31:35 -0800 Subject: Fix clang `-Wunused-parameter` warnings Comment out unused method parameters in their relevant definitions. Signed-off-by: Enji Cooper --- googlemock/test/gmock-generated-matchers_test.cc | 2 +- googlemock/test/gmock-matchers_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'googlemock') diff --git a/googlemock/test/gmock-generated-matchers_test.cc b/googlemock/test/gmock-generated-matchers_test.cc index eb47f2b0..6c4b3000 100644 --- a/googlemock/test/gmock-generated-matchers_test.cc +++ b/googlemock/test/gmock-generated-matchers_test.cc @@ -1262,7 +1262,7 @@ namespace adl_test { MATCHER(M, "") { return true; } template -bool AllOf(const T1& t1, const T2& t2) { return true; } +bool AllOf(const T1& /*t1*/, const T2& /*t2*/) { return true; } TEST(AllOfTest, DoesNotCallAllOfUnqualified) { EXPECT_THAT(42, testing::AllOf( diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index b586d276..40ccaf05 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -6943,7 +6943,7 @@ TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) { // For testing Args<>'s explanation. class LessThanMatcher : public MatcherInterface > { public: - void DescribeTo(::std::ostream* os) const override {} + void DescribeTo(::std::ostream* /*os*/) const override {} bool MatchAndExplain(std::tuple value, MatchResultListener* listener) const override { -- cgit v1.2.3