grpc/terminate.patch

36 lines
1.9 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2024-01-31 20:50:55.596208216 +0100
[ 221s] src/core/lib/promise/party.h: In member function 'bool grpc_core::Party::PromiseParticipantImpl<SuppliedFactory>::PollParticipantPromise() [with SuppliedFactory = grpc_core::ForwardCall(CallHandler, CallInitiator, ClientMetadataHandle)::<lambda()> mutable::<lambda(grpc_core::MessageHandle)> mutable::<lambda()>]':
[ 221s] src/core/lib/promise/party.h:541:5: error: control reaches end of non-void function [-Werror=return-type]
[ 221s] src/core/lib/promise/party.h: In member function 'grpc_core::Poll<typename grpc_core::promise_detail::OncePromiseFactory<void, F>::Promise::Result> grpc_core::Party::PromiseParticipantImpl<SuppliedFactory>::PollCompletion() [with SuppliedFactory = grpc_core::ForwardCall(CallHandler, CallInitiator, ClientMetadataHandle)::<lambda()> mutable::<lambda(grpc_core::MessageHandle)> mutable::<lambda()>]':
[ 221s] src/core/lib/promise/party.h:553:5: error: control reaches end of non-void function [-Werror=return-type]
That enum class only has three numerators, and it's not clear why gcc
would warn, given all three cases return.
---
src/core/lib/promise/party.h | 4 ++++
1 file changed, 4 insertions(+)
Index: grpc-1.61.0/src/core/lib/promise/party.h
===================================================================
--- grpc-1.61.0.orig/src/core/lib/promise/party.h
+++ grpc-1.61.0/src/core/lib/promise/party.h
@@ -538,6 +538,7 @@ class Party : public Activity, private W
Crash(
"unreachable: promises should not be repolled after completion");
}
+ std::terminate();
}
// Outside party poll: check whether the spawning party has completed this
@@ -550,6 +552,7 @@ class Party : public Activity, private W
case State::kResult:
return std::move(result_);
}
+ std::terminate();
}
void Destroy() override { this->Unref(); }