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 <kchai@redhat.com>
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");
}
}
case RWState::RWNONE:
return;
default:
- ceph_abort_msg("invalid lock type");
- return;
+ assert(0 == "invalid lock type");
}
}