Skip to content

Commit cb4bc5a

Browse files
committed
coll/sync: fix compiler warnings
Add missing "const" qualifiers to some arguments. Signed-off-by: Jeff Squyres <[email protected]>
1 parent 93abcc1 commit cb4bc5a

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

ompi/mca/coll/sync/coll_sync.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2008-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -71,7 +71,7 @@ int mca_coll_sync_gather(const void *sbuf, int scount,
7171

7272
int mca_coll_sync_gatherv(const void *sbuf, int scount,
7373
struct ompi_datatype_t *sdtype,
74-
void *rbuf, int *rcounts, int *disps,
74+
void *rbuf, const int *rcounts, const int *disps,
7575
struct ompi_datatype_t *rdtype,
7676
int root,
7777
struct ompi_communicator_t *comm,
@@ -85,7 +85,7 @@ int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
8585
mca_coll_base_module_t *module);
8686

8787
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
88-
int *rcounts,
88+
const int *rcounts,
8989
struct ompi_datatype_t *dtype,
9090
struct ompi_op_t *op,
9191
struct ompi_communicator_t *comm,
@@ -105,8 +105,8 @@ int mca_coll_sync_scatter(const void *sbuf, int scount,
105105
struct ompi_communicator_t *comm,
106106
mca_coll_base_module_t *module);
107107

108-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts, int *disps,
109-
struct ompi_datatype_t *sdtype,
108+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
109+
const int *disps, struct ompi_datatype_t *sdtype,
110110
void *rbuf, int rcount,
111111
struct ompi_datatype_t *rdtype,
112112
int root,

ompi/mca/coll/sync/coll_sync_gatherv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -31,7 +31,7 @@
3131
*/
3232
int mca_coll_sync_gatherv(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
34-
void *rbuf, int *rcounts, int *disps,
34+
void *rbuf, const int *rcounts, const int *disps,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,
3737
mca_coll_base_module_t *module)

ompi/mca/coll/sync/coll_sync_reduce_scatter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
13-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
* $COPYRIGHT$
1515
*
1616
* Additional copyrights may follow
@@ -30,7 +30,8 @@
3030
* Accepts: - same as MPI_Reduce_scatter()
3131
* Returns: - MPI_SUCCESS or error code
3232
*/
33-
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, int *rcounts,
33+
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
34+
const int *rcounts,
3435
struct ompi_datatype_t *dtype,
3536
struct ompi_op_t *op,
3637
struct ompi_communicator_t *comm,

ompi/mca/coll/sync/coll_sync_scatterv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -29,8 +29,8 @@
2929
* Accepts: - same arguments as MPI_Scatterv()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts,
33-
int *disps, struct ompi_datatype_t *sdtype,
32+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
33+
const int *disps, struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,

0 commit comments

Comments
 (0)