Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Explicit cast.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 24 Nov 2020 08:43:39 +0000 (09:43 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 24 Nov 2020 08:43:39 +0000 (09:43 +0100)
src/smpi/mpi/smpi_datatype.cpp
src/smpi/mpi/smpi_win.cpp

index 09e34be..0dcfaef 100644 (file)
@@ -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<int>(name_.length());
   if (not name_.empty()) {
     name_.copy(name, *length);
     name[*length] = '\0';
index b90cf57..2c7d83c 100644 (file)
@@ -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<int>(name_.length());
   if (not name_.empty()) {
     name_.copy(name, *length);
     name[*length] = '\0';