From 2cf4862b49b2c422bef7edde43e493de9b0c245b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 20 Jan 2014 15:44:45 +0000 Subject: [PATCH] Cleanup warnings for use of void* - requires intermediate cast to uintptr_t. Thanks to Paul Hargrove for reporting it cmr=v1.7.4:reviewer=jsquyres This commit was SVN r30333. --- ompi/mca/btl/openib/btl_openib.c | 2 +- ompi/mca/btl/openib/btl_openib_endpoint.h | 4 ++-- ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c | 8 ++++---- ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ompi/mca/btl/openib/btl_openib.c b/ompi/mca/btl/openib/btl_openib.c index efac1c0e2a..978ef4a357 100644 --- a/ompi/mca/btl/openib/btl_openib.c +++ b/ompi/mca/btl/openib/btl_openib.c @@ -271,7 +271,7 @@ static int check_if_device_support_modify_srq(mca_btl_openib_module_t *openib_bt return rc; } - sge_elem.addr = (uint64_t) &buff; + sge_elem.addr = (uint64_t)((uintptr_t) &buff); sge_elem.length = sizeof(buff); wr1.num_sge = wr2.num_sge = 1; diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.h b/ompi/mca/btl/openib/btl_openib_endpoint.h index 8d1524443a..ead2fd20af 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.h +++ b/ompi/mca/btl/openib/btl_openib_endpoint.h @@ -367,8 +367,8 @@ static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp, wr = wr->next = &to_recv_frag(item)->rd_desc; OPAL_OUTPUT((-1, "Posting recv (QP num %d): WR ID %p, SG addr %p, len %d, lkey %d", ep->qps[qp].qp->lcl_qp->qp_num, - (void*) wr->wr_id, - (void*) wr->sg_list[0].addr, + (void*) ((uintptr_t*)wr->wr_id), + (void*)((uintptr_t*) wr->sg_list[0].addr), wr->sg_list[0].length, wr->sg_list[0].lkey)); } diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c b/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c index 438b4275a6..dae82e6d8d 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c @@ -908,13 +908,13 @@ static int handle_connect_request(struct rdma_cm_event *event) goto out1; } OPAL_OUTPUT((-1, "Posted CTS receiver buffer (%p) for peer %s, qp index %d (QP num %d), WR ID %p, SG addr %p, len %d, lkey %d", - (void*) wr->sg_list[0].addr, + (void*)((uintptr_t*) wr->sg_list[0].addr), (NULL == endpoint->endpoint_proc->proc_ompi->proc_hostname) ? "unknown" : endpoint->endpoint_proc->proc_ompi->proc_hostname, qpnum, endpoint->qps[qpnum].qp->lcl_qp->qp_num, - (void*) wr->wr_id, - (void*) wr->sg_list[0].addr, + (void*)((uintptr_t*) wr->wr_id), + (void*)((uintptr_t*) wr->sg_list[0].addr), wr->sg_list[0].length, wr->sg_list[0].lkey)); } @@ -1385,7 +1385,7 @@ static int finish_connect(id_context_t *context) goto out1; } OPAL_OUTPUT((-1, "Posted initiator CTS buffer (%p, length %d) for peer %s, qp index %d (QP num %d)", - (void*) wr->sg_list[0].addr, + (void*)((uintptr_t*) wr->sg_list[0].addr), wr->sg_list[0].length, (NULL == contents->endpoint->endpoint_proc->proc_ompi->proc_hostname) ? "unknown" : contents->endpoint->endpoint_proc->proc_ompi->proc_hostname, diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c b/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c index c37ca27ee2..520112dbc8 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -1452,7 +1452,7 @@ static int udcm_post_send (mca_btl_base_endpoint_t *lcl_ep, void *data, sge.length = length; sge.lkey = m->cm_mr->lkey; - memcpy ((void *)sge.addr, data, length); + memcpy ((uintptr_t *)sge.addr, data, length); } else { sge.addr = (uintptr_t) data; sge.length = length;