Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-cpp/gmock: Fix test failure with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=602158 Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
1 parent
61866f7
commit 09552b1
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Bug: https://bugs.gentoo.org/602158 | ||
Patch: https://github.com/google/googletest/issues/705#issuecomment-235067917 | ||
|
||
--- a/include/gmock/gmock-spec-builders.h | ||
+++ b/include/gmock/gmock-spec-builders.h | ||
@@ -1370,6 +1370,8 @@ | ||
template <> | ||
class ActionResultHolder<void> : public UntypedActionResultHolderBase { | ||
public: | ||
+ explicit ActionResultHolder() {} | ||
+ | ||
void GetValueAndDelete() const { delete this; } | ||
|
||
virtual void PrintAsActionResult(::std::ostream* /* os */) const {} | ||
@@ -1381,7 +1383,7 @@ | ||
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. | ||
@@ -1390,7 +1392,7 @@ | ||
const Action<F>& action, | ||
const typename Function<F>::ArgumentTuple& args) { | ||
action.Perform(args); | ||
- return NULL; | ||
+ return new ActionResultHolder(); | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters