1
1

Make the compiler happy by comparing similar types.

This commit was SVN r3219.
Этот коммит содержится в:
George Bosilca 2004-10-19 23:30:19 +00:00
родитель 53ddf3e0fc
Коммит 0b2b7cd2c7
3 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -54,7 +54,7 @@ int MPI_Pack(void *inbuf, int incount, MPI_Datatype datatype,
/* Check for truncation */
ompi_convertor_get_packed_size(local_convertor, &size);
if (*position + size > outsize) {
if( (*position + size) > (unsigned int)outsize ) { /* we can cast as we already checked for < 0 */
OBJ_RELEASE(local_convertor);
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TRUNCATE, FUNC_NAME);
}

Просмотреть файл

@ -26,6 +26,7 @@ int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm,
{
int ret;
ompi_convertor_t *local_convertor;
unsigned int length;
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
@ -42,7 +43,8 @@ int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm,
local_convertor = OBJ_NEW(ompi_convertor_t);
ompi_convertor_init_for_send(local_convertor, 0, datatype, incount,
NULL, 0, NULL /* never allocate memory */);
ret = ompi_convertor_get_packed_size(local_convertor, size);
ret = ompi_convertor_get_packed_size(local_convertor, &length);
*size = (int)length;
OBJ_RELEASE(local_convertor);
OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_UNKNOWN, FUNC_NAME);

Просмотреть файл

@ -58,7 +58,7 @@ int MPI_Unpack(void *inbuf, int insize, int *position,
/* Check for truncation */
ompi_convertor_get_packed_size(local_convertor, &size);
if (*position + size > insize) {
if( (*position + size) > (unsigned int)insize ) {
OBJ_RELEASE(local_convertor);
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TRUNCATE, FUNC_NAME);
}