fix: resolve -Wmissing-declarations warning

Wrapped `intToCallReaction` in an anonymous namespace to prevent it from leaking into the global scope. This resolves the missing declaration compiler warning.

Fixes #3909
This commit is contained in:
Aditya Kumar Yadav 2026-05-24 10:54:12 +05:30 committed by GitHub
parent add971c7cb
commit cb551cbb5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -442,14 +442,16 @@ bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()
return expectations_met;
}
static CallReaction intToCallReaction(int mock_behavior) {
namespace{
CallReaction intToCallReaction(int mock_behavior) {
if (mock_behavior >= kAllow && mock_behavior <= kFail) {
return static_cast<internal::CallReaction>(mock_behavior);
}
return kWarn;
}
}
} // namespace internal
// Class Mock.