From: Kefu Chai Date: Fri, 24 Jul 2020 08:30:44 +0000 (+0800) Subject: crimson/net: mark abort_ functions [[noreturn]] X-Git-Tag: wip-pdonnell-testing-20200918.022351~556^2~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=55e2e1e0955f1e3e25f81294fb2e38007c1faef4;p=ceph-ci.git crimson/net: mark abort_ functions [[noreturn]] otherwise compiler complains if control reaches end of non-void function. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index 250734ae484..448e5340768 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -56,15 +56,15 @@ seastar::logger& logger() { return crimson::get_logger(ceph_subsys_ms); } -void abort_in_fault() { +[[noreturn]] void abort_in_fault() { throw std::system_error(make_error_code(crimson::net::error::negotiation_failure)); } -void abort_protocol() { +[[noreturn]] void abort_protocol() { throw std::system_error(make_error_code(crimson::net::error::protocol_aborted)); } -void abort_in_close(crimson::net::ProtocolV2& proto, bool dispatch_reset) { +[[noreturn]] void abort_in_close(crimson::net::ProtocolV2& proto, bool dispatch_reset) { proto.close(dispatch_reset); abort_protocol(); }