Skip to content

Commit e649993

Browse files
jacobsacopybara-github
authored andcommitted
gmock-spec-builders: remove the name for an unused parameter.
This fixes unused parameter errors under both MSVC and clang (when `-Werror=unused-parameter` is used, as reported [here](9d21db9#r74769946)). Fixes #3858 PiperOrigin-RevId: 451907906 Change-Id: Ic07da19ea6a547eb1797fbbab19cd57cc2a83fe8
1 parent 9d21db9 commit e649993

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

googlemock/include/gmock/gmock-spec-builders.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,10 +1698,6 @@ class FunctionMocker<R(Args...)> final : public UntypedFunctionMockerBase {
16981698
return std::forward<R>(result);
16991699
}
17001700

1701-
// Disable warnings about an unused parameter (due to SFINAE choosing an
1702-
// overload that doesn't use it).
1703-
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4100);
1704-
17051701
// An overload for when it's not possible to print the result. In this case we
17061702
// simply perform the action.
17071703
template <typename T = R,
@@ -1710,12 +1706,10 @@ class FunctionMocker<R(Args...)> final : public UntypedFunctionMockerBase {
17101706
R PerformActionAndPrintResult(const void* const untyped_action,
17111707
ArgumentTuple&& args,
17121708
const std::string& call_description,
1713-
std::ostream& os) {
1709+
std::ostream&) {
17141710
return PerformAction(untyped_action, std::move(args), call_description);
17151711
}
17161712

1717-
GTEST_DISABLE_MSC_WARNINGS_POP_();
1718-
17191713
// Returns the result of invoking this mock function with the given
17201714
// arguments. This function can be safely called from multiple
17211715
// threads concurrently.

0 commit comments

Comments
 (0)