Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[pvs] The 'status' pointer was utilized before it was verified against nullptr.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Nov 2020 21:12:02 +0000 (22:12 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Nov 2020 21:12:16 +0000 (22:12 +0100)
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;