]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os: do not return a value for non-reachable branch
authorKefu Chai <kchai@redhat.com>
Sat, 15 Aug 2020 11:04:19 +0000 (19:04 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 16 Aug 2020 01:37:21 +0000 (09:37 +0800)
commitb168bc02b3c6349c8d824211e17309db503f873a
treee44d0f9d472d9bf44a31e487124eb6622e27b0e8
parent0fb54fbcf0150f9bfc515b614a3566d52c3a7f04
crimson/os: do not return a value for non-reachable branch

for silencing a warning like

btree/btree_lba_manager.cc:177:12: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
    return *static_cast<btree_range_pin_t*>(nullptr);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ceph_abort_msg() is marked [[noreturn]], so we can just use it here
without worrying about complains from compiler.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/seastore/lba_manager/btree/btree_lba_manager.cc