Skip to content

Commit e9d533e

Browse files
committed
Fix warnings from non-debug mode.
Thanks Ralph for the report.
1 parent cb473ee commit e9d533e

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

ompi/mca/coll/base/coll_base_allgather.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
168168
*/
169169
if (0 != rank) {
170170
char *free_buf = NULL, *shift_buf = NULL;
171-
ptrdiff_t span, gap;
171+
ptrdiff_t span, gap = 0;
172172

173173
span = opal_datatype_span(&rdtype->super, (int64_t)(size - rank) * rcount, &gap);
174174

ompi/mca/coll/base/coll_base_allreduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ompi_coll_base_allreduce_intra_recursivedoubling(const void *sbuf, void *rbuf,
135135
int ret, line, rank, size, adjsize, remote, distance;
136136
int newrank, newremote, extra_ranks;
137137
char *tmpsend = NULL, *tmprecv = NULL, *tmpswap = NULL, *inplacebuf_free = NULL, *inplacebuf;
138-
ptrdiff_t span, gap;
138+
ptrdiff_t span, gap = 0;
139139

140140
size = ompi_comm_size(comm);
141141
rank = ompi_comm_rank(comm);

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-2016 The University of Tennessee and The University
6+
* Copyright (c) 2004-2017 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,
@@ -42,7 +42,7 @@ mca_coll_base_alltoall_intra_basic_inplace(const void *rbuf, int rcount,
4242
mca_coll_base_module_t *module)
4343
{
4444
int i, j, size, rank, err = MPI_SUCCESS, line;
45-
ptrdiff_t ext, gap;
45+
ptrdiff_t ext, gap = 0;
4646
ompi_request_t *req;
4747
char *allocated_buffer = NULL, *tmp_buffer;
4848
size_t max_size;
@@ -197,7 +197,7 @@ int ompi_coll_base_alltoall_intra_bruck(const void *sbuf, int scount,
197197
int i, k, line = -1, rank, size, err = 0;
198198
int sendto, recvfrom, distance, *displs = NULL, *blen = NULL;
199199
char *tmpbuf = NULL, *tmpbuf_free = NULL;
200-
ptrdiff_t sext, rext, span, gap;
200+
ptrdiff_t sext, rext, span, gap = 0;
201201
struct ompi_datatype_t *new_ddt;
202202

203203
if (MPI_IN_PLACE == sbuf) {

ompi/mca/coll/base/coll_base_gather.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-2015 The University of Tennessee and The University
6+
* Copyright (c) 2004-2017 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,
@@ -49,8 +49,8 @@ ompi_coll_base_gather_intra_binomial(const void *sbuf, int scount,
4949
char *ptmp = NULL, *tempbuf = NULL;
5050
ompi_coll_tree_t* bmtree;
5151
MPI_Status status;
52-
MPI_Aint sextent, sgap, ssize;
53-
MPI_Aint rextent, rgap, rsize;
52+
MPI_Aint sextent, sgap = 0, ssize;
53+
MPI_Aint rextent, rgap = 0, rsize;
5454
mca_coll_base_module_t *base_module = (mca_coll_base_module_t*) module;
5555
mca_coll_base_comm_t *data = base_module->base_data;
5656

ompi/mca/coll/base/coll_base_reduce.c

Lines changed: 4 additions & 4 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-2015 The University of Tennessee and The University
6+
* Copyright (c) 2004-2017 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,
@@ -65,7 +65,7 @@ int ompi_coll_base_reduce_generic( const void* sendbuf, void* recvbuf, int origi
6565
char *inbuf[2] = {NULL, NULL}, *inbuf_free[2] = {NULL, NULL};
6666
char *accumbuf = NULL, *accumbuf_free = NULL;
6767
char *local_op_buffer = NULL, *sendtmpbuf = NULL;
68-
ptrdiff_t extent, size, gap, segment_increment;
68+
ptrdiff_t extent, size, gap = 0, segment_increment;
6969
ompi_request_t **sreq = NULL, *reqs[2] = {MPI_REQUEST_NULL, MPI_REQUEST_NULL};
7070
int num_segments, line, ret, segindex, i, rank;
7171
int recvcount, prevcount, inbi;
@@ -526,7 +526,7 @@ int ompi_coll_base_reduce_intra_in_order_binary( const void *sendbuf, void *recv
526526
use_this_sendbuf = (void *)sendbuf;
527527
use_this_recvbuf = recvbuf;
528528
if (io_root != root) {
529-
ptrdiff_t dsize, gap;
529+
ptrdiff_t dsize, gap = 0;
530530
char *tmpbuf;
531531

532532
dsize = opal_datatype_span(&datatype->super, count, &gap);
@@ -610,7 +610,7 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
610610
mca_coll_base_module_t *module)
611611
{
612612
int i, rank, err, size;
613-
ptrdiff_t extent, dsize, gap;
613+
ptrdiff_t extent, dsize, gap = 0;
614614
char *free_buffer = NULL;
615615
char *pml_buffer = NULL;
616616
char *inplace_temp_free = NULL;

ompi/mca/coll/base/coll_base_reduce_scatter.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int ompi_coll_base_reduce_scatter_intra_nonoverlapping(const void *sbuf, void *r
7676
if (root == rank) {
7777
/* We must allocate temporary receive buffer on root to ensure that
7878
rbuf is big enough */
79-
ptrdiff_t dsize, gap;
79+
ptrdiff_t dsize, gap = 0;
8080
dsize = opal_datatype_span(&dtype->super, total_count, &gap);
8181

8282
tmprbuf_free = (char*) malloc(dsize);
@@ -138,7 +138,7 @@ ompi_coll_base_reduce_scatter_intra_basic_recursivehalving( const void *sbuf,
138138
{
139139
int i, rank, size, count, err = OMPI_SUCCESS;
140140
int tmp_size, remain = 0, tmp_rank, *disps = NULL;
141-
ptrdiff_t extent, buf_size, gap;
141+
ptrdiff_t extent, buf_size, gap = 0;
142142
char *recv_buf = NULL, *recv_buf_free = NULL;
143143
char *result_buf = NULL, *result_buf_free = NULL;
144144

@@ -462,7 +462,7 @@ ompi_coll_base_reduce_scatter_intra_ring( const void *sbuf, void *rbuf, const in
462462
int inbi, *displs = NULL;
463463
char *tmpsend = NULL, *tmprecv = NULL, *accumbuf = NULL, *accumbuf_free = NULL;
464464
char *inbuf_free[2] = {NULL, NULL}, *inbuf[2] = {NULL, NULL};
465-
ptrdiff_t extent, max_real_segsize, dsize, gap;
465+
ptrdiff_t extent, max_real_segsize, dsize, gap = 0;
466466
ompi_request_t *reqs[2] = {NULL, NULL};
467467

468468
size = ompi_comm_size(comm);

ompi/mca/coll/base/coll_base_scatter.c

Lines changed: 2 additions & 2 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-2015 The University of Tennessee and The University
6+
* Copyright (c) 2004-2017 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,
@@ -49,7 +49,7 @@ ompi_coll_base_scatter_intra_binomial( const void *sbuf, int scount,
4949
MPI_Status status;
5050
mca_coll_base_module_t *base_module = (mca_coll_base_module_t*) module;
5151
mca_coll_base_comm_t *data = base_module->base_data;
52-
ptrdiff_t sextent, rextent, ssize, rsize, sgap, rgap;
52+
ptrdiff_t sextent, rextent, ssize, rsize, sgap = 0, rgap = 0;
5353

5454

5555
size = ompi_comm_size(comm);

0 commit comments

Comments
 (0)