Skip to content

Commit b827868

Browse files
authored
Merge pull request #11788 from bosilca/fix/issue_11742
Remove some compiler warnings.
2 parents 1a73735 + 8d8fe71 commit b827868

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

ompi/communicator/comm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2019 The University of Tennessee and The University
6+
* Copyright (c) 2004-2023 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2022 High Performance Computing Center Stuttgart,
@@ -2215,10 +2215,10 @@ int ompi_comm_get_rprocs (ompi_communicator_t *local_comm, ompi_communicator_t *
22152215
int rc = OMPI_SUCCESS;
22162216
int local_rank, local_size;
22172217
ompi_proc_t **rprocs=NULL;
2218-
int32_t size_len;
2218+
size_t size_len;
22192219
int int_len=0, rlen;
22202220
pmix_data_buffer_t *sbuf=NULL, *rbuf=NULL;
2221-
void *sendbuf=NULL;
2221+
char *sendbuf=NULL;
22222222
char *recvbuf;
22232223
ompi_proc_t **proc_list = NULL;
22242224
int i;

ompi/mca/coll/base/coll_base_alltoall.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2021 The University of Tennessee and The University
6+
* Copyright (c) 2004-2023 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -274,7 +274,7 @@ int ompi_coll_base_alltoall_intra_bruck(const void *sbuf, int scount,
274274
tmpbuf = tmpbuf_free - gap;
275275

276276
/* Step 1 - local rotation - shift up by rank */
277-
err = ompi_datatype_sndrcv (sbuf + ((ptrdiff_t) rank * scount * sext),
277+
err = ompi_datatype_sndrcv ((char*)sbuf + ((ptrdiff_t) rank * scount * sext),
278278
(int32_t) (size - rank) * scount,
279279
sdtype,
280280
tmpbuf,
@@ -285,7 +285,7 @@ int ompi_coll_base_alltoall_intra_bruck(const void *sbuf, int scount,
285285
}
286286

287287
if (rank != 0) {
288-
err = ompi_datatype_sndrcv (sbuf,
288+
err = ompi_datatype_sndrcv ((char*)sbuf,
289289
(int32_t) rank * scount,
290290
sdtype,
291291
tmpbuf + ((ptrdiff_t) (size - rank) * rcount * rext),

ompi/mca/coll/cuda/coll_cuda_reduce.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004-2015 The University of Tennessee and The University
2+
* Copyright (c) 2004-2023 The University of Tennessee and The University
33
* of Tennessee Research Foundation. All rights
44
* reserved.
55
* Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved.
@@ -37,7 +37,6 @@ mca_coll_cuda_reduce(const void *sbuf, void *rbuf, int count,
3737
int rank = ompi_comm_rank(comm);
3838
ptrdiff_t gap;
3939
char *rbuf1 = NULL, *sbuf1 = NULL, *rbuf2 = NULL;
40-
const char *sbuf2;
4140
size_t bufsize;
4241
int rc;
4342

@@ -53,7 +52,6 @@ mca_coll_cuda_reduce(const void *sbuf, void *rbuf, int count,
5352
return OMPI_ERR_OUT_OF_RESOURCE;
5453
}
5554
mca_coll_cuda_memcpy(sbuf1, sbuf, bufsize);
56-
sbuf2 = sbuf; /* save away original buffer */
5755
sbuf = sbuf1 - gap;
5856
}
5957

ompi/mca/coll/han/coll_han_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static int han_register(void)
437437
/*
438438
* Default values
439439
*/
440-
for (int topo_lvl = 0 ; topo_lvl < GLOBAL_COMMUNICATOR ; topo_lvl++) {
440+
for (topo_lvl = 0 ; topo_lvl < GLOBAL_COMMUNICATOR ; topo_lvl++) {
441441
cs->mca_sub_components[coll][topo_lvl] = TUNED;
442442
}
443443
cs->mca_sub_components[coll][GLOBAL_COMMUNICATOR] = HAN;

0 commit comments

Comments
 (0)