File terminate.patch of Package python-grpcio

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: grpcio-1.62.0/src/core/lib/promise/party.h
===================================================================
--- grpcio-1.62.0.orig/src/core/lib/promise/party.h
+++ grpcio-1.62.0/src/core/lib/promise/party.h
@@ -564,6 +564,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
@@ -576,6 +577,7 @@ class Party : public Activity, private W
         case State::kResult:
           return std::move(result_);
       }
+      std::terminate();
     }
 
     void Destroy() override { this->Unref(); }
openSUSE Build Service is sponsored by