Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Const for local variables.
[simgrid.git] / src / smpi / bindings / smpi_pmpi_request.cpp
index c64a63a..ddc0a15 100644 (file)
@@ -138,7 +138,7 @@ int PMPI_Startall(int count, MPI_Request * requests)
       TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Startall"));
       if (not TRACE_smpi_view_internals())
         for (int i = 0; i < count; i++) {
-          MPI_Request req = requests[i];
+          const simgrid::smpi::Request* req = requests[i];
           if (req->flags() & MPI_REQ_SEND)
             TRACE_smpi_send(my_proc_id, my_proc_id, getPid(req->comm(), req->dst()), req->tag(), req->size());
         }
@@ -147,7 +147,7 @@ int PMPI_Startall(int count, MPI_Request * requests)
 
       if (not TRACE_smpi_view_internals())
         for (int i = 0; i < count; i++) {
-          MPI_Request req = requests[i];
+          const simgrid::smpi::Request* req = requests[i];
           if (req->flags() & MPI_REQ_RECV)
             TRACE_smpi_recv(getPid(req->comm(), req->src()), my_proc_id, req->tag());
         }
@@ -588,10 +588,9 @@ int PMPI_Iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* statu
 }
 
 // TODO: cheinrich: Move declaration to other file? Rename this function - it's used for PMPI_Wait*?
-static void trace_smpi_recv_helper(MPI_Request* request, MPI_Status* status);
 static void trace_smpi_recv_helper(MPI_Request* request, MPI_Status* status)
 {
-  MPI_Request req = *request;
+  const simgrid::smpi::Request* req = *request;
   if (req != MPI_REQUEST_NULL) { // Received requests become null
     int src_traced = req->src();
     // the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)