From: Arnaud Giersch Date: Tue, 24 Nov 2020 08:43:39 +0000 (+0100) Subject: Explicit cast. X-Git-Tag: v3.26~126 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/af9bd625142707c3c75a2e795be627dbb63ee163 Explicit cast. --- diff --git a/src/smpi/mpi/smpi_datatype.cpp b/src/smpi/mpi/smpi_datatype.cpp index 09e34bef6b..0dcfaefa25 100644 --- a/src/smpi/mpi/smpi_datatype.cpp +++ b/src/smpi/mpi/smpi_datatype.cpp @@ -260,7 +260,7 @@ int Datatype::extent(MPI_Aint* lb, MPI_Aint* extent) const void Datatype::get_name(char* name, int* length) const { - *length = name_.length(); + *length = static_cast(name_.length()); if (not name_.empty()) { name_.copy(name, *length); name[*length] = '\0'; diff --git a/src/smpi/mpi/smpi_win.cpp b/src/smpi/mpi/smpi_win.cpp index b90cf57a3b..2c7d83cede 100644 --- a/src/smpi/mpi/smpi_win.cpp +++ b/src/smpi/mpi/smpi_win.cpp @@ -98,7 +98,7 @@ int Win::detach(const void* /*base*/) void Win::get_name(char* name, int* length) const { - *length = name_.length(); + *length = static_cast(name_.length()); if (not name_.empty()) { name_.copy(name, *length); name[*length] = '\0';