From af9bd625142707c3c75a2e795be627dbb63ee163 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 24 Nov 2020 09:43:39 +0100 Subject: [PATCH] Explicit cast. --- src/smpi/mpi/smpi_datatype.cpp | 2 +- src/smpi/mpi/smpi_win.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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'; -- 2.20.1