From: Arnaud Giersch Date: Thu, 24 Jun 2021 08:01:10 +0000 (+0200) Subject: Fix type for variable. X-Git-Tag: v3.28~69 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/511a6147a4ffab7a15ca53980e641f18d545903b Fix type for variable. --- diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index d24b78a63b..d6abc90aaf 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -688,13 +688,12 @@ int Request::testany(int count, MPI_Request requests[], int *index, int* flag, M std::vector comms; comms.reserve(count); - int i; *flag = 0; int ret = MPI_SUCCESS; *index = MPI_UNDEFINED; std::vector map; /** Maps all matching comms back to their location in requests **/ - for(i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { if ((requests[i] != MPI_REQUEST_NULL) && requests[i]->action_ && not(requests[i]->flags_ & MPI_REQ_PREPARED)) { comms.push_back(static_cast(requests[i]->action_.get())); map.push_back(i); @@ -705,6 +704,7 @@ int Request::testany(int count, MPI_Request requests[], int *index, int* flag, M static int nsleeps = 1; if(smpi_test_sleep > 0) simgrid::s4u::this_actor::sleep_for(nsleeps * smpi_test_sleep); + ssize_t i; try{ i = simcall_comm_testany(comms.data(), comms.size()); // The i-th element in comms matches! } catch (const Exception&) { @@ -1081,7 +1081,7 @@ int Request::waitany(int count, MPI_Request requests[], MPI_Status * status) } if (not comms.empty()) { XBT_DEBUG("Enter waitany for %zu comms", comms.size()); - int i; + ssize_t i; try{ i = simcall_comm_waitany(comms.data(), comms.size(), -1); } catch (const CancelException&) {