Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
help scan-build understanding that status is not used unintialized
[simgrid.git] / src / smpi / internals / smpi_replay.cpp
index 2172bf4..6d00532 100644 (file)
@@ -457,13 +457,15 @@ void RecvAction::kernel(simgrid::xbt::ReplayAction&)
     args.size = status.count;
   }
 
-  bool is_recv = false;
+  bool is_recv = false; // Help analyzers understanding that status is not used unintialized
   if (name == "recv") {
-    Request::recv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status);
     is_recv = true;
+    Request::recv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status);
   } else if (name == "irecv") {
     MPI_Request request = Request::irecv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
     req_storage.add(request);
+  } else {
+    THROW_IMPOSSIBLE;
   }
 
   TRACE_smpi_comm_out(my_proc_id);