From ce658a6aa768ce88ec3f4ba5afac4c4b7837272a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 15 Sep 2020 09:55:47 +0800 Subject: [PATCH] crimson/osd: replace "ceph_abort_msg()" with assert() these are programming errors, and are easy to detect. also assert() does not return, so compiler won't complain at seeing a branch does not return value in a function that returns value. Signed-off-by: Kefu Chai --- src/crimson/osd/object_context.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/crimson/osd/object_context.h b/src/crimson/osd/object_context.h index 6f158bbd64ecf..8f25420948b0b 100644 --- a/src/crimson/osd/object_context.h +++ b/src/crimson/osd/object_context.h @@ -123,8 +123,7 @@ public: case RWState::RWNONE: return seastar::make_ready_future<>(); default: - ceph_abort_msg("invalid lock type"); - return seastar::make_ready_future<>(); + assert(0 == "invalid lock type"); } } @@ -139,8 +138,7 @@ public: case RWState::RWNONE: return; default: - ceph_abort_msg("invalid lock type"); - return; + assert(0 == "invalid lock type"); } } -- 2.39.5