Skip to content

Commit 79cd4d3

Browse files
authored
Merge pull request #12440 from jiaxiyan/warning
Fix compiler warning: declaration of i
2 parents b5328be + 569a5b4 commit 79cd4d3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ompi/mca/coll/basic/coll_basic_gatherv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ mca_coll_basic_gatherv_intra(const void *sbuf, int scount,
107107
err = ompi_request_wait_all(nrecv, reqs, MPI_STATUSES_IGNORE);
108108

109109
if (MPI_ERR_IN_STATUS == err) {
110-
for (int i = 0; i < nrecv; i++) {
111-
if (MPI_REQUEST_NULL == reqs[i])
110+
for (size_t j = 0; j < nrecv; j++) {
111+
if (MPI_REQUEST_NULL == reqs[j])
112112
continue;
113-
if (MPI_ERR_PENDING == reqs[i]->req_status.MPI_ERROR)
113+
if (MPI_ERR_PENDING == reqs[j]->req_status.MPI_ERROR)
114114
continue;
115-
if (MPI_SUCCESS != reqs[i]->req_status.MPI_ERROR) {
116-
err = reqs[i]->req_status.MPI_ERROR;
115+
if (MPI_SUCCESS != reqs[j]->req_status.MPI_ERROR) {
116+
err = reqs[j]->req_status.MPI_ERROR;
117117
break;
118118
}
119119
}

0 commit comments

Comments
 (0)