From: Arnaud Giersch Date: Wed, 25 Nov 2020 21:12:02 +0000 (+0100) Subject: [pvs] The 'status' pointer was utilized before it was verified against nullptr. X-Git-Tag: v3.26~106 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/18be315df9e3c0639b33c60507addc5d21a89901 [pvs] The 'status' pointer was utilized before it was verified against nullptr. --- diff --git a/src/smpi/include/smpi_file.hpp b/src/smpi/include/smpi_file.hpp index 17969e59d6..9abac40511 100644 --- a/src/smpi/include/smpi_file.hpp +++ b/src/smpi/include/smpi_file.hpp @@ -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;