diff --git a/ompi/mpi/c/get_count.c b/ompi/mpi/c/get_count.c index 9f683da903..98776ccdbb 100644 --- a/ompi/mpi/c/get_count.c +++ b/ompi/mpi/c/get_count.c @@ -34,12 +34,12 @@ static const char FUNC_NAME[] = "MPI_Get_count"; int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) { - int size = 0; - int rc = MPI_SUCCESS; + size_t size = 0; + int rc = MPI_SUCCESS; if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, count); + OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, 1); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME); } @@ -49,7 +49,7 @@ int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) *count = 0; } else { *count = status->_count / size; - if( ((*count) * size) != status->_count ) + if( (int)((*count) * size) != status->_count ) *count = MPI_UNDEFINED; } }