From 80cdafb8f436fb318942b9b48a675025b1828bd5 Mon Sep 17 00:00:00 2001 From: Sven Stork Date: Mon, 30 Jul 2007 15:36:00 +0000 Subject: [PATCH] - remove dead code found by coverity This commit was SVN r15685. --- ompi/mpi/c/accumulate.c | 2 -- ompi/mpi/c/dims_create.c | 4 ---- ompi/mpi/c/get.c | 2 -- ompi/mpi/c/put.c | 2 -- 4 files changed, 10 deletions(-) diff --git a/ompi/mpi/c/accumulate.c b/ompi/mpi/c/accumulate.c index 85a3983001..93125d7c76 100644 --- a/ompi/mpi/c/accumulate.c +++ b/ompi/mpi/c/accumulate.c @@ -65,8 +65,6 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data rc = MPI_ERR_RMA_SYNC; } else if ( target_disp < 0 ) { rc = MPI_ERR_DISP; - } else if ( (origin_count < 0) || (target_count < 0) ) { - rc = MPI_ERR_COUNT; } else { OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count); if (OMPI_SUCCESS == rc) { diff --git a/ompi/mpi/c/dims_create.c b/ompi/mpi/c/dims_create.c index 5642a777cc..3edfde0341 100644 --- a/ompi/mpi/c/dims_create.c +++ b/ompi/mpi/c/dims_create.c @@ -61,10 +61,6 @@ int MPI_Dims_create(int nnodes, int ndims, int *dims) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_DIMS, FUNC_NAME); } - if (0 == ndims && 0 >= nnodes) { - return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, - MPI_ERR_ARG, FUNC_NAME); - } } /* Get # of free-to-be-assigned processes and # of free dimensions */ diff --git a/ompi/mpi/c/get.c b/ompi/mpi/c/get.c index 5b8544c888..b23f2a5262 100644 --- a/ompi/mpi/c/get.c +++ b/ompi/mpi/c/get.c @@ -59,8 +59,6 @@ int MPI_Get(void *origin_addr, int origin_count, rc = MPI_ERR_RMA_SYNC; } else if ( target_disp < 0 ) { rc = MPI_ERR_DISP; - } else if ( (origin_count < 0) || (target_count < 0) ) { - rc = MPI_ERR_COUNT; } else { OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count); if (OMPI_SUCCESS == rc) { diff --git a/ompi/mpi/c/put.c b/ompi/mpi/c/put.c index 9a9c75f965..8c8949e3cd 100644 --- a/ompi/mpi/c/put.c +++ b/ompi/mpi/c/put.c @@ -62,8 +62,6 @@ int MPI_Put(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, rc = MPI_ERR_TYPE; } else if ( target_disp < 0 ) { rc = MPI_ERR_DISP; - } else if ( (origin_count < 0) || (target_count < 0) ) { - rc = MPI_ERR_COUNT; } else { OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count); if (OMPI_SUCCESS == rc) {