Commit 95ca219e authored by Antonio J. Pena's avatar Antonio J. Pena
Browse files

Moved variable declarations to avoud warnings



Moved a couple of variable declarations inside their block to avoid compilers
complaining when those blocks are not compiled because of an #ifdef evaluated
to false.
Signed-off-by: default avatarWesley Bland <wbland@mcs.anl.gov>
parent e39d17ea
......@@ -620,7 +620,6 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
MPID_Datatype *sendtype_ptr, *recvtype_ptr;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISCATTER);
MPIU_THREAD_CS_ENTER(ALLFUNC,);
......@@ -647,6 +646,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
MPID_BEGIN_ERROR_CHECKS
{
MPID_Datatype *sendtype_ptr, *recvtype_ptr;
MPID_Comm_valid_ptr(comm_ptr, mpi_errno);
if (comm_ptr->comm_kind == MPID_INTRACOMM) {
MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
......
......@@ -143,7 +143,6 @@ Output Parameters:
int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op)
{
int mpi_errno = MPI_SUCCESS;
MPID_Op *op_ptr;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE_LOCAL);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......@@ -159,6 +158,7 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype
MPIR_ERRTEST_OP(op, mpi_errno);
if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) {
MPID_Op *op_ptr;
MPID_Op_get_ptr(op, op_ptr);
MPID_Op_valid_ptr( op_ptr, mpi_errno );
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment