Skip to content

Commit c133d17

Browse files
committed
coll han: remove extra (void*) indirection
No need to use a "*(void**)" cast+dereference; cast to (intptr_t) and then to (void*) to get the correct type. Without this fix, gcc 14's static analyzer emitted warnings about reading out of bounds. Signed-off-by: Jeff Squyres <[email protected]>
1 parent f8c9460 commit c133d17

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ompi/mca/coll/han/coll_han_alltoall.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ int mca_coll_han_alltoall_using_smsc(
207207
/* all ranks will pull from the other ranks' sbuf */
208208
gather_buf_in[0] = (void*)sbuf;
209209
}
210-
gather_buf_in[1] = *(void**)&send_needs_bounce;
211-
gather_buf_in[2] = *(void**)&ii_push_data;
210+
gather_buf_in[1] = (void*)(intptr_t)send_needs_bounce;
211+
gather_buf_in[2] = (void*)(intptr_t)ii_push_data;
212212

213213
rc = low_comm->c_coll->coll_allgather(gather_buf_in, nptrs_gather, MPI_AINT,
214214
gather_buf_out, nptrs_gather, MPI_AINT, low_comm,
@@ -385,5 +385,4 @@ int mca_coll_han_alltoall_using_smsc(
385385
OPAL_OUTPUT_VERBOSE((40, mca_coll_han_component.han_output,
386386
"Alltoall Complete with %d\n",rc));
387387
return rc;
388-
389-
}
388+
}

0 commit comments

Comments
 (0)