Skip to content

Commit

Permalink
HDFS-15232. Fix libhdfspp test failures with GCC 7. (apache#1906)
Browse files Browse the repository at this point in the history
  • Loading branch information
aajisaka authored and RogPodge committed Mar 25, 2020
1 parent a59e642 commit 9cfb4c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9930,6 +9930,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
template <>
class ActionResultHolder<void> : public UntypedActionResultHolderBase {
public:
explicit ActionResultHolder() {}

void GetValueAndDelete() const { delete this; }

virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
Expand All @@ -9941,7 +9943,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
const typename Function<F>::ArgumentTuple& args,
const string& call_description) {
func_mocker->PerformDefaultAction(args, call_description);
return NULL;
return new ActionResultHolder();
}

// Performs the given action and returns NULL.
Expand All @@ -9950,7 +9952,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
const Action<F>& action,
const typename Function<F>::ArgumentTuple& args) {
action.Perform(args);
return NULL;
return new ActionResultHolder();
}
};

Expand Down

0 comments on commit 9cfb4c9

Please sign in to comment.