Skip to content

Commit 6c6e35b

Browse files
committed
ompi/communicator: silence warnings
1 parent b95e243 commit 6c6e35b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ompi/communicator/comm_cid.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ static int ompi_comm_allreduce_inter_nb (int *inbuf, int *outbuf,
607607
ompi_comm_allreduce_context_t *context;
608608
ompi_comm_request_t *request;
609609
ompi_request_t *subreq;
610-
int local_rank, rsize, rc;
610+
int local_rank, rc;
611611

612612
if (!OMPI_COMM_IS_INTER (cid_context->comm)) {
613613
return MPI_ERR_COMM;
@@ -627,7 +627,6 @@ static int ompi_comm_allreduce_inter_nb (int *inbuf, int *outbuf,
627627
request->context = &context->super;
628628

629629
/* Allocate temporary arrays */
630-
rsize = ompi_comm_remote_size (intercomm);
631630
local_rank = ompi_comm_rank (intercomm);
632631

633632
if (0 == local_rank) {
@@ -700,12 +699,12 @@ static int ompi_comm_allreduce_inter_bcast (ompi_comm_request_t *request)
700699
ompi_comm_allreduce_context_t *context = (ompi_comm_allreduce_context_t *) request->context;
701700
ompi_communicator_t *comm = context->cid_context->comm->c_local_comm;
702701
ompi_request_t *subreq;
703-
int scount = 0, rc;
702+
int rc;
704703

705704
/* both roots have the same result. broadcast to the local group */
706705
rc = comm->c_coll.coll_ibcast (context->outbuf, context->count, MPI_INT, 0, comm,
707706
&subreq, comm->c_coll.coll_ibcast_module);
708-
if (OMPI_SUCCESS != rc) {
707+
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
709708
return rc;
710709
}
711710

0 commit comments

Comments
 (0)