]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: mark abort_ functions [[noreturn]]
authorKefu Chai <kchai@redhat.com>
Fri, 24 Jul 2020 08:30:44 +0000 (16:30 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 27 Jul 2020 02:32:01 +0000 (10:32 +0800)
otherwise compiler complains if control reaches end of non-void
function.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/net/ProtocolV2.cc

index 250734ae4842fae7a60f0a15ccf0b76e4260c38b..448e53407683afe0183d9efd24b8758b55303488 100644 (file)
@@ -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();
 }