Fix int <--> pointer casting by adding intermediate cast through (intptr_t)
Reviewed by Dave Goodell cmr=v1.7.4:reviewer=ompi-rm1.7:subject=Add intptr_t casting in usnic btl This commit was SVN r30243.
Этот коммит содержится в:
родитель
5259ab213f
Коммит
34ae50a0ed
@ -949,7 +949,7 @@ static int usnic_component_progress(void)
|
|||||||
if (ibv_poll_cq(channel->cq, 1, &wc) == 1) {
|
if (ibv_poll_cq(channel->cq, 1, &wc) == 1) {
|
||||||
if (OPAL_LIKELY(wc.opcode == IBV_WC_RECV &&
|
if (OPAL_LIKELY(wc.opcode == IBV_WC_RECV &&
|
||||||
wc.status == IBV_WC_SUCCESS)) {
|
wc.status == IBV_WC_SUCCESS)) {
|
||||||
rseg = (ompi_btl_usnic_recv_segment_t*)wc.wr_id;
|
rseg = (ompi_btl_usnic_recv_segment_t*)(intptr_t)wc.wr_id;
|
||||||
ompi_btl_usnic_recv_fast(module, rseg, channel);
|
ompi_btl_usnic_recv_fast(module, rseg, channel);
|
||||||
fastpath_ok = false; /* prevent starvation */
|
fastpath_ok = false; /* prevent starvation */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -400,7 +400,7 @@ prepare_src_small(
|
|||||||
assert(payload_len <= module->max_frag_payload);
|
assert(payload_len <= module->max_frag_payload);
|
||||||
usnic_convertor_pack_simple(
|
usnic_convertor_pack_simple(
|
||||||
convertor,
|
convertor,
|
||||||
(IOVBASE_TYPE*)(frag->sf_base.uf_src_seg[0].seg_addr.lval + reserve),
|
(IOVBASE_TYPE*)(intptr_t)(frag->sf_base.uf_src_seg[0].seg_addr.lval + reserve),
|
||||||
*size,
|
*size,
|
||||||
size);
|
size);
|
||||||
payload_len = reserve + *size;
|
payload_len = reserve + *size;
|
||||||
@ -1335,7 +1335,7 @@ usnic_send(
|
|||||||
|
|
||||||
/* make a copy of the data for retrans */
|
/* make a copy of the data for retrans */
|
||||||
if (frag->sf_base.uf_base.des_src_cnt > 1) {
|
if (frag->sf_base.uf_base.des_src_cnt > 1) {
|
||||||
memcpy(((char *)frag->sf_base.uf_src_seg[0].seg_addr.lval +
|
memcpy(((char *)(intptr_t)frag->sf_base.uf_src_seg[0].seg_addr.lval +
|
||||||
frag->sf_base.uf_src_seg[0].seg_len),
|
frag->sf_base.uf_src_seg[0].seg_len),
|
||||||
frag->sf_base.uf_src_seg[1].seg_addr.pval,
|
frag->sf_base.uf_src_seg[1].seg_addr.pval,
|
||||||
frag->sf_base.uf_src_seg[1].seg_len);
|
frag->sf_base.uf_src_seg[1].seg_len);
|
||||||
|
@ -135,7 +135,7 @@ ompi_btl_usnic_finish_put_or_send(
|
|||||||
/* no convertor */
|
/* no convertor */
|
||||||
assert(NULL != frag->sf_base.uf_src_seg[1].seg_addr.pval);
|
assert(NULL != frag->sf_base.uf_src_seg[1].seg_addr.pval);
|
||||||
|
|
||||||
memcpy(((char *)frag->sf_base.uf_src_seg[0].seg_addr.lval +
|
memcpy(((char *)(intptr_t)frag->sf_base.uf_src_seg[0].seg_addr.lval +
|
||||||
frag->sf_base.uf_src_seg[0].seg_len),
|
frag->sf_base.uf_src_seg[0].seg_len),
|
||||||
frag->sf_base.uf_src_seg[1].seg_addr.pval,
|
frag->sf_base.uf_src_seg[1].seg_addr.pval,
|
||||||
frag->sf_base.uf_src_seg[1].seg_len);
|
frag->sf_base.uf_src_seg[1].seg_len);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user