Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[pvs] The 'status' pointer was utilized before it was verified against nullptr.
[simgrid.git] / src / smpi / include / smpi_file.hpp
index 17969e5..9abac40 100644 (file)
@@ -103,7 +103,8 @@ int File::op_all(void* buf, int count, const Datatype* datatype, MPI_Status* sta
   XBT_CDEBUG(smpi_pmpi, "my offsets to read : %lld:%lld, global min and max %lld:%lld", min_offset, max_offset, min,
              max);
   if (empty == 1) {
-    status->count = 0;
+    if (status != MPI_STATUS_IGNORE)
+      status->count = 0;
     return MPI_SUCCESS;
   }
   MPI_Offset total = max - min;