From: Danny Al-Gaaf Date: Fri, 1 Mar 2013 16:11:31 +0000 (+0100) Subject: osd/PG.cc: use static_cast instead of C-Style cast X-Git-Tag: v0.59~54^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75a265f2df7fdd2471e0edd7a6903da8e64ee41c;p=ceph.git osd/PG.cc: use static_cast instead of C-Style cast Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index d5a0a094333..7f9b4ba16b9 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2910,7 +2910,7 @@ void PG::unreg_next_scrub() void PG::sub_op_scrub_map(OpRequestRef op) { - MOSDSubOp *m = (MOSDSubOp *)op->request; + MOSDSubOp *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_SUBOP); dout(7) << "sub_op_scrub_map" << dendl; @@ -3067,7 +3067,7 @@ void PG::_request_scrub_map(int replica, eversion_t version, void PG::sub_op_scrub_reserve(OpRequestRef op) { - MOSDSubOp *m = (MOSDSubOp*)op->request; + MOSDSubOp *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_SUBOP); dout(7) << "sub_op_scrub_reserve" << dendl; @@ -3087,7 +3087,7 @@ void PG::sub_op_scrub_reserve(OpRequestRef op) void PG::sub_op_scrub_reserve_reply(OpRequestRef op) { - MOSDSubOpReply *reply = (MOSDSubOpReply*)op->request; + MOSDSubOpReply *reply = static_cast(op->request); assert(reply->get_header().type == MSG_OSD_SUBOPREPLY); dout(7) << "sub_op_scrub_reserve_reply" << dendl; @@ -3132,7 +3132,7 @@ void PG::sub_op_scrub_stop(OpRequestRef op) { op->mark_started(); - MOSDSubOp *m = (MOSDSubOp*)op->request; + MOSDSubOp *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_SUBOP); dout(7) << "sub_op_scrub_stop" << dendl; @@ -4793,7 +4793,7 @@ ostream& operator<<(ostream& out, const PG& pg) bool PG::can_discard_op(OpRequestRef op) { - MOSDOp *m = (MOSDOp*)op->request; + MOSDOp *m = static_cast(op->request); if (OSD::op_is_discardable(m)) { dout(20) << " discard " << *m << dendl; return true; @@ -4820,7 +4820,7 @@ bool PG::can_discard_op(OpRequestRef op) bool PG::can_discard_subop(OpRequestRef op) { - MOSDSubOp *m = (MOSDSubOp *)op->request; + MOSDSubOp *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_SUBOP); // same pg? @@ -4836,7 +4836,7 @@ bool PG::can_discard_subop(OpRequestRef op) bool PG::can_discard_scan(OpRequestRef op) { - MOSDPGScan *m = (MOSDPGScan *)op->request; + MOSDPGScan *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_PG_SCAN); if (old_peering_msg(m->map_epoch, m->query_epoch)) { @@ -4848,7 +4848,7 @@ bool PG::can_discard_scan(OpRequestRef op) bool PG::can_discard_backfill(OpRequestRef op) { - MOSDPGBackfill *m = (MOSDPGBackfill *)op->request; + MOSDPGBackfill *m = static_cast(op->request); assert(m->get_header().type == MSG_OSD_PG_BACKFILL); if (old_peering_msg(m->map_epoch, m->query_epoch)) {