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

Compiler complains about uninitialized variable



Fixes compiler warnings in ch3u_rma_ops.c and ch3u_rma_acc_ops.c. Complains
were about "orig_vc" and "target_vc" of potentially being unused. This is a
false positive, as the conditional statements were correct. Warning fixed by just
initializing the pointers to NULL. gcc 4.6.3 complained in stomp, whereas gcc
4.7.4 did not on my laptop.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent 8996387d
......@@ -25,7 +25,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
......@@ -140,7 +140,7 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
{
int mpi_errno = MPI_SUCCESS;
int rank;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
......@@ -233,7 +233,7 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
{
int mpi_errno = MPI_SUCCESS;
int rank;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP);
......
......@@ -122,7 +122,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
......@@ -234,7 +234,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
......@@ -344,7 +344,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
......
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