From f59f6891c8bf70bdddc1f2535588bea41155b480 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Tue, 24 Mar 2020 11:36:14 +0900 Subject: [PATCH] HDFS-15232. Fix libhdfspp test failures with GCC 7. (#1906) --- .../native/libhdfspp/third_party/gmock-1.7.0/gmock/gmock.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/gmock-1.7.0/gmock/gmock.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/gmock-1.7.0/gmock/gmock.h index e8dd7fc3d2..dd1b86573f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/gmock-1.7.0/gmock/gmock.h +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/gmock-1.7.0/gmock/gmock.h @@ -9930,6 +9930,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase { template <> class ActionResultHolder : public UntypedActionResultHolderBase { public: + explicit ActionResultHolder() {} + void GetValueAndDelete() const { delete this; } virtual void PrintAsActionResult(::std::ostream* /* os */) const {} @@ -9941,7 +9943,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase { const typename Function::ArgumentTuple& args, const string& call_description) { func_mocker->PerformDefaultAction(args, call_description); - return NULL; + return new ActionResultHolder(); } // Performs the given action and returns NULL. @@ -9950,7 +9952,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase { const Action& action, const typename Function::ArgumentTuple& args) { action.Perform(args); - return NULL; + return new ActionResultHolder(); } };