[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-121-g1eb07c6

mysql vizuser noreply at mpich.org
Mon Dec 30 15:33:04 CST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  1eb07c6e38c48e7d83649ed7a41630d1a9f98912 (commit)
       via  4bbeb5222ebce5af9ac7bf6fe5d4f8c17bc47cd5 (commit)
       via  9665638294c180a9e6cd3aaabb4cbedd9a73aee8 (commit)
       via  8ea1dfec1f51eae94aeeccc64848762e312ed0c6 (commit)
       via  7a1da4a9dd1c015aeb19d3e60c97af20d4bea0b3 (commit)
       via  44aa78991748cd20399f0e987d4c98e4a473e81c (commit)
       via  6ca3ae6c359b734555eb4eb1d325b16c32a0da9b (commit)
       via  2225f092efe8b8836d8a2c6292fb6dd456a39ef3 (commit)
       via  583e3f0a8f0e9d8acaaea2de4722110c78c8e32b (commit)
      from  3c37766610b0d89b69b4b21b7053696c4efbfa3f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/1eb07c6e38c48e7d83649ed7a41630d1a9f98912

commit 1eb07c6e38c48e7d83649ed7a41630d1a9f98912
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Mon Nov 18 16:40:58 2013 -0600

    Fix compiler warnings in hwloc with --enable-fast
    
    A couple of unused variables when assert does nothing were causing compiler
    warnings. Fixed by declaring them as potentially unused.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
index 4ac1d8d..5e09731 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
@@ -2719,7 +2719,7 @@ look_sysfsnode(struct hwloc_topology *topology,
       for (index_ = 0; index_ < nbnodes; index_++) {
           char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
           hwloc_bitmap_t cpuset;
-          hwloc_obj_t node, res_obj;
+          hwloc_obj_t node, res_obj __hwloc_attribute_unused;
 
 	  osnode = indexes[index_];
 
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
index fd5d7e4..40832a5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
@@ -1406,7 +1406,7 @@ hwloc_export_obj_userdata_base64(void *reserved,
   hwloc__xml_export_state_t state = reserved;
   size_t encoded_length;
   char *encoded_buffer;
-  int ret;
+  int ret __hwloc_attribute_unused;
 
   if (name && hwloc__xml_export_check_buffer(name, strlen(name)) < 0) {
     errno = EINVAL;

http://git.mpich.org/mpich.git/commitdiff/4bbeb5222ebce5af9ac7bf6fe5d4f8c17bc47cd5

commit 4bbeb5222ebce5af9ac7bf6fe5d4f8c17bc47cd5
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Mon Nov 18 16:21:35 2013 -0600

    Fix warnings in variables only used in assertions
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/ad_coll_build_req_new.c b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
index 4512153..2ea9754 100644
--- a/src/mpi/romio/adio/common/ad_coll_build_req_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
@@ -902,7 +902,6 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
     ADIO_Offset *fr_st_off_arr = fd->file_realm_st_offs;
     ADIO_Offset *agg_comm_cur_sz_arr = NULL;
     MPI_Datatype *fr_type_arr = fd->file_realm_types;
-    int cb_node_ct = fd->hints->cb_nodes;
     int *agg_ol_ct_arr = NULL;
     int *agg_ol_cur_ct_arr = NULL;
     int tmp_agg_fr_idx = -1;
@@ -984,7 +983,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
 	    for (j = 0; j < nprocs; j++)
 	    {
 		tmp_agg_fr_idx = ADIOI_Agg_idx(j, fd);
-		assert(tmp_agg_fr_idx < cb_node_ct);
+                assert(tmp_agg_fr_idx < fd->hints->cb_nodes);
 		
 		/* If this process is not an aggregator or we have
 		 * finished all the bytes for this aggregator, move
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index 5cd6790..e911408 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -35,17 +35,14 @@ int MPIR_Ineighbor_allgather_default(const void *sendbuf, int sendcount, MPI_Dat
     int indegree, outdegree, weighted;
     int k,l;
     int *srcs, *dsts;
-    int comm_size;
     MPI_Aint recvtype_extent;
     MPIU_CHKLMEM_DECL(2);
 
-    comm_size = comm_ptr->local_size;
-
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     /* This is the largest offset we add to recvbuf */
     MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
-                                     (comm_size * recvcount * recvtype_extent));
+                                     (comm_ptr->local_size * recvcount * recvtype_extent));
 
     mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index 152d33e..1bc1d0e 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -35,21 +35,18 @@ int MPIR_Ineighbor_alltoall_default(const void *sendbuf, int sendcount, MPI_Data
     int indegree, outdegree, weighted;
     int k,l;
     int *srcs, *dsts;
-    int comm_size;
     MPI_Aint sendtype_extent, recvtype_extent;
     MPIU_CHKLMEM_DECL(2);
 
-    comm_size = comm_ptr->local_size;
-
     MPID_Datatype_get_extent_macro(sendtype, sendtype_extent);
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     /* This is the largest offset we add to sendbuf */
     MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
-                                     (comm_size * sendcount * sendtype_extent));
+                                     (comm_ptr->local_size * sendcount * sendtype_extent));
     /* This is the largest offset we add to recvbuf */
     MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
-                                     (comm_size * recvcount * recvtype_extent));
+                                     (comm_ptr->local_size * recvcount * recvtype_extent));
 
     mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);

http://git.mpich.org/mpich.git/commitdiff/9665638294c180a9e6cd3aaabb4cbedd9a73aee8

commit 9665638294c180a9e6cd3aaabb4cbedd9a73aee8
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Mon Nov 18 16:20:05 2013 -0600

    Enclose into #ifdef code causing compiler warnings
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/datatype/type_match_size.c b/src/mpi/datatype/type_match_size.c
index cebc7e2..4a318e8 100644
--- a/src/mpi/datatype/type_match_size.c
+++ b/src/mpi/datatype/type_match_size.c
@@ -56,7 +56,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
 {
     static const char FCNAME[] = "MPI_Type_match_size";
     int mpi_errno = MPI_SUCCESS;
+#ifdef HAVE_ERROR_CHECKING
     static const char *tname = 0;
+#endif
     /* Note that all of the datatype have values, even if the type is 
        not available. We test for that case separately.  We also 
        prefer the Fortran types to the C type, if they are available */
@@ -116,7 +118,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
     case MPI_TYPECLASS_REAL: 
 	{
 	    int nRealTypes = sizeof(real_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
 	    tname = "MPI_TYPECLASS_REAL";
+#endif
 	    for (i=0; i<nRealTypes; i++) {
 		if (real_types[i] == MPI_DATATYPE_NULL) { continue; }
 		MPIR_Type_size_impl( real_types[i], &tsize );
@@ -130,7 +134,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
     case MPI_TYPECLASS_INTEGER:
 	{
 	    int nIntTypes = sizeof(int_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
 	    tname = "MPI_TYPECLASS_INTEGER";
+#endif
 	    for (i=0; i<nIntTypes; i++) {
 		if (int_types[i] == MPI_DATATYPE_NULL) { continue; }
 		MPIR_Type_size_impl( int_types[i], &tsize );
@@ -144,7 +150,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
     case MPI_TYPECLASS_COMPLEX:
 	{
 	    int nComplexTypes = sizeof(complex_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
 	    tname = "MPI_TYPECLASS_COMPLEX";
+#endif
 	    for (i=0; i<nComplexTypes; i++) {
 		if (complex_types[i] == MPI_DATATYPE_NULL) { continue; }
 		MPIR_Type_size_impl( complex_types[i], &tsize );

http://git.mpich.org/mpich.git/commitdiff/8ea1dfec1f51eae94aeeccc64848762e312ed0c6

commit 8ea1dfec1f51eae94aeeccc64848762e312ed0c6
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Mon Nov 18 16:17:16 2013 -0600

    Fix compiler warnings about variables for assert
    
    Mark those variables exclusively being used for assertions as potentially
    unused to avoid compiler warnings when the assertion macro does nothing. These
    show up with --enable-fast.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimplthreadpost.h b/src/include/mpiimplthreadpost.h
index c5cdf47..be4578f 100644
--- a/src/include/mpiimplthreadpost.h
+++ b/src/include/mpiimplthreadpost.h
@@ -180,7 +180,7 @@ MPIU_Thread_CS_yield_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
                                               const char *lockname,
                                               MPID_Thread_mutex_t *mutex)
 {
-    int depth;
+    int depth ATTRIBUTE((unused));
     MPIU_THREADPRIV_DECL;
     MPIU_THREADPRIV_GET;
     depth = MPIU_THREADPRIV_FIELD(lock_depth)[kind];
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index 81e9030..9921146 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -36,7 +36,7 @@ int MPIR_Iallgatherv_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype se
     int mask, dst, total_count, position, offset, my_tree_root, dst_tree_root;
     MPI_Aint recvtype_extent, recvtype_true_extent, recvtype_true_lb;
     void *tmp_buf = NULL;
-    int is_homogeneous;
+    int is_homogeneous ATTRIBUTE((unused));
     MPIR_SCHED_CHKPMEM_DECL(1);
 
     comm_size = comm_ptr->local_size;
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 3b8e9d6..d23792c 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -317,7 +317,7 @@ int MPIR_Ibcast_scatter_rec_dbl_allgather(void *buffer, int count, MPI_Datatype
     int rank, comm_size, dst;
     int relative_rank, mask;
     int scatter_size, nbytes, curr_size, incoming_count;
-    int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous;
+    int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous ATTRIBUTE((unused));
     int relative_dst, dst_tree_root, my_tree_root, send_offset;
     int recv_offset, tree_root, nprocs_completed, offset;
     MPID_Datatype *dtp;
@@ -556,7 +556,7 @@ int MPIR_Ibcast_scatter_ring_allgather(void *buffer, int count, MPI_Datatype dat
 {
     int mpi_errno = MPI_SUCCESS;
     int comm_size, rank;
-    int is_contig, is_homogeneous, type_size, nbytes;
+    int is_contig, is_homogeneous ATTRIBUTE((unused)), type_size, nbytes;
     int scatter_size;
     int i, j, jnext, left, right;
     MPI_Aint true_extent, true_lb;
@@ -755,7 +755,7 @@ fn_fail:
 int MPIR_Ibcast_intra(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, MPID_Sched_t s)
 {
     int mpi_errno = MPI_SUCCESS;
-    int comm_size, is_homogeneous;
+    int comm_size, is_homogeneous ATTRIBUTE((unused));
     MPI_Aint type_size, nbytes;
 
     MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index feb9c31..1113e99 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -226,7 +226,7 @@ fn_fail:
 int MPIR_Ireduce_redscat_gather(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, MPID_Sched_t s)
 {
     int mpi_errno = MPI_SUCCESS;
-    int i, j, comm_size, rank, pof2, is_commutative;
+    int i, j, comm_size, rank, pof2, is_commutative ATTRIBUTE((unused));
     int rem, dst, newrank, newdst, mask, send_idx, recv_idx, last_idx;
     int send_cnt, recv_cnt, newroot, newdst_tree_root, newroot_tree_root;
     void *tmp_buf = NULL;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index 646471a..3427fcd 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -1820,7 +1820,7 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll)
                 int req_errno = MPI_SUCCESS;
                 ssize_t rc;
                 char dummy;
-                const char *err_str = "UNKNOWN";
+                const char *err_str ATTRIBUTE((unused)) = "UNKNOWN";
 
                 /* See if we can get a specific error for this fd
                    (Stevens Network Programming Vol 1, pg 184) */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
index 0287794..f9fad4a 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
@@ -139,7 +139,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
     char *kvs_name;
     char *serialized_hnd = NULL;
     void *current_addr;
-    void *start_addr;
+    void *start_addr ATTRIBUTE((unused));
     size_t size_left;
     MPIU_CHKPMEM_DECL (1);
     MPIU_CHKLMEM_DECL (2);
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 0b9be5d..e67dfe1 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -19,7 +19,7 @@ static int do_simple_get(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_queue);
 int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPID_Request * rreq, 
 			       int * complete)
 {
-    static int in_routine = FALSE;
+    static int in_routine ATTRIBUTE((unused)) = FALSE;
     int mpi_errno = MPI_SUCCESS;
     int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_HANDLE_RECV_REQ);
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index e07c0f1..f4f9000 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -805,7 +805,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
     /* A matching request was not found in the posted queue, so we 
        need to allocate a new request and add it to the unexpected queue */
     {
-	int mpi_errno=0;
+        int mpi_errno ATTRIBUTE((unused)) = 0;
 	MPIDI_Request_create_rreq( rreq, mpi_errno, 
 				   found=FALSE;goto lock_exit );
         MPIU_Assert(mpi_errno == 0);
diff --git a/src/mpid/common/datatype/dataloop/dataloop_create.c b/src/mpid/common/datatype/dataloop/dataloop_create.c
index 1d9f3d7..5fbeb97 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_create.c
+++ b/src/mpid/common/datatype/dataloop/dataloop_create.c
@@ -23,7 +23,7 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
 				     int flag)
 {
     int i;
-    int err;
+    int err ATTRIBUTE((unused));
 
     int nr_ints, nr_aints, nr_types, combiner;
     MPI_Datatype *types;
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 8bd6806..2dc5ceb 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -434,7 +434,7 @@ void MPIDU_Datatype_debug(MPI_Datatype type,
 			  int array_ct)
 {
     int is_builtin;
-    MPID_Datatype *dtp;
+    MPID_Datatype *dtp ATTRIBUTE((unused));
 
     is_builtin = (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN);
 
diff --git a/src/mpid/common/datatype/mpir_type_flatten.c b/src/mpid/common/datatype/mpir_type_flatten.c
index 8e9b332..10cdab6 100644
--- a/src/mpid/common/datatype/mpir_type_flatten.c
+++ b/src/mpid/common/datatype/mpir_type_flatten.c
@@ -30,7 +30,7 @@ int MPIR_Type_flatten(MPI_Datatype type,
 {
     int err;
     MPI_Aint first, last;
-    MPID_Datatype *datatype_ptr;
+    MPID_Datatype *datatype_ptr ATTRIBUTE((unused));
     MPID_Segment *segp;
 
     if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) {

http://git.mpich.org/mpich.git/commitdiff/7a1da4a9dd1c015aeb19d3e60c97af20d4bea0b3

commit 7a1da4a9dd1c015aeb19d3e60c97af20d4bea0b3
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Mon Nov 18 16:09:58 2013 -0600

    Fix compiler warnings about unused variables
    
    These only show up with --enable-fast
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/attr/comm_free_keyval.c b/src/mpi/attr/comm_free_keyval.c
index 7b325de..6044d37 100644
--- a/src/mpi/attr/comm_free_keyval.c
+++ b/src/mpi/attr/comm_free_keyval.c
@@ -71,7 +71,6 @@ Key values are global (they can be used with any and all communicators)
 @*/
 int MPI_Comm_free_keyval(int *comm_keyval)
 {
-    MPID_Keyval *keyval_ptr = NULL;
     int          mpi_errno = MPI_SUCCESS;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_FREE_KEYVAL);
 
@@ -93,14 +92,16 @@ int MPI_Comm_free_keyval(int *comm_keyval)
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Keyval_get_ptr( *comm_keyval, keyval_ptr );
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Keyval *keyval_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Keyval_get_ptr( *comm_keyval, keyval_ptr );
+
 	    MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index f30f39c..161154f 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -109,7 +109,6 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    MPID_Keyval *keyval_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_SET_ATTR);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -132,17 +131,19 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 
     /* Convert MPI object handles to object pointers */
     MPID_Comm_get_ptr( comm, comm_ptr );
-    MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
 
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Keyval *keyval_ptr = NULL;
+
             /* Validate comm_ptr */
             MPID_Comm_valid_ptr( comm_ptr, mpi_errno );
 	    /* If comm_ptr is not valid, it will be reset to null */
 	    /* Validate keyval_ptr */
+            MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
 	    MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
 	}
@@ -217,7 +218,6 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    MPID_Keyval *keyval_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_SET_ATTR);
 
     MPIU_THREAD_CS_ENTER(ALLFUNC,);
@@ -238,17 +238,19 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
 
     /* Convert MPI object handles to object pointers */
     MPID_Comm_get_ptr( comm, comm_ptr );
-    MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
 
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Keyval *keyval_ptr = NULL;
+
             /* Validate comm_ptr */
             MPID_Comm_valid_ptr( comm_ptr, mpi_errno );
 	    /* If comm_ptr is not valid, it will be reset to null */
 	    /* Validate keyval_ptr */
+            MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
 	    MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
 	}
diff --git a/src/mpi/attr/keyval_free.c b/src/mpi/attr/keyval_free.c
index acfe38a..fa700fe 100644
--- a/src/mpi/attr/keyval_free.c
+++ b/src/mpi/attr/keyval_free.c
@@ -57,7 +57,6 @@ int MPI_Keyval_free(int *keyval)
 {
     static const char FCNAME[] = "MPI_Keyval_free";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Keyval *keyval_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_KEYVAL_FREE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -74,14 +73,16 @@ int MPI_Keyval_free(int *keyval)
     }
 #   endif /* HAVE_ERROR_CHECKING */
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Keyval_get_ptr( *keyval, keyval_ptr );
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Keyval *keyval_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Keyval_get_ptr( *keyval, keyval_ptr );
+
 	    MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/datatype/get_elements.c b/src/mpi/datatype/get_elements.c
index 3c47a31..e02b5b3 100644
--- a/src/mpi/datatype/get_elements.c
+++ b/src/mpi/datatype/get_elements.c
@@ -57,7 +57,6 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Count count_x;
-    MPID_Datatype *datatype_ptr = NULL;
 
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_GET_ELEMENTS);
 
@@ -76,16 +75,17 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
 	    MPIR_ERRTEST_ARGNULL(status, "status", mpi_errno);
 	    MPIR_ERRTEST_ARGNULL(count, "count", mpi_errno);
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
             /* Validate datatype_ptr */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
diff --git a/src/mpi/datatype/pack_external_size.c b/src/mpi/datatype/pack_external_size.c
index 721a64f..cb0f797 100644
--- a/src/mpi/datatype/pack_external_size.c
+++ b/src/mpi/datatype/pack_external_size.c
@@ -57,7 +57,6 @@ int MPI_Pack_external_size(const char datarep[],
 			   MPI_Aint *size)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_PACK_EXTERNAL_SIZE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -76,14 +75,16 @@ int MPI_Pack_external_size(const char datarep[],
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
diff --git a/src/mpi/datatype/pack_size.c b/src/mpi/datatype/pack_size.c
index a4ef60a..a705c9e 100644
--- a/src/mpi/datatype/pack_size.c
+++ b/src/mpi/datatype/pack_size.c
@@ -74,7 +74,9 @@ int MPI_Pack_size(int incount,
 		  MPI_Comm comm,
 		  int *size)
 {
+#ifdef HAVE_ERROR_CHECKING
     MPID_Comm *comm_ptr = NULL;
+#endif
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint size_x = MPI_UNDEFINED;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_PACK_SIZE);
@@ -94,11 +96,11 @@ int MPI_Pack_size(int incount,
     }
 #   endif /* HAVE_ERROR_CHECKING */
     
-    /* Convert MPI object handles to object pointers */
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    
 #   ifdef HAVE_ERROR_CHECKING
     {
+        /* Convert MPI object handles to object pointers */
+        MPID_Comm_get_ptr( comm, comm_ptr );
+
         MPID_BEGIN_ERROR_CHECKS;
         {
             MPID_Datatype *datatype_ptr = NULL;
diff --git a/src/mpi/datatype/type_commit.c b/src/mpi/datatype/type_commit.c
index cba1fcd..90d7284 100644
--- a/src/mpi/datatype/type_commit.c
+++ b/src/mpi/datatype/type_commit.c
@@ -72,7 +72,6 @@ Input Parameters:
 int MPI_Type_commit(MPI_Datatype *datatype)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_COMMIT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -92,14 +91,16 @@ int MPI_Type_commit(MPI_Datatype *datatype)
     }
 #   endif
     
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr( *datatype, datatype_ptr );
-    
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr( *datatype, datatype_ptr );
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_create_subarray.c b/src/mpi/datatype/type_create_subarray.c
index 728766c..4a61b66 100644
--- a/src/mpi/datatype/type_create_subarray.c
+++ b/src/mpi/datatype/type_create_subarray.c
@@ -80,7 +80,6 @@ int MPI_Type_create_subarray(int ndims,
     int *ints;
     MPID_Datatype *new_dtp;
 
-    MPID_Datatype *datatype_ptr = NULL;
     MPIU_CHKLMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
 
@@ -89,12 +88,12 @@ int MPI_Type_create_subarray(int ndims,
     MPIU_THREAD_CS_ENTER(ALLFUNC,);
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
 
-    /* Get handles to MPI objects. */
-    MPID_Datatype_get_ptr(oldtype, datatype_ptr);
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
 	    /* Check parameters */
 	    MPIR_ERRTEST_ARGNONPOS(ndims, "ndims", mpi_errno, MPI_ERR_DIMS);
 	    MPIR_ERRTEST_ARGNULL(array_of_sizes, "array_of_sizes", mpi_errno);
@@ -166,6 +165,9 @@ int MPI_Type_create_subarray(int ndims,
                 goto fn_fail;
             }
 
+            /* Get handles to MPI objects. */
+            MPID_Datatype_get_ptr(oldtype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
diff --git a/src/mpi/datatype/type_extent.c b/src/mpi/datatype/type_extent.c
index 8d1fd71..1ef9eb7 100644
--- a/src/mpi/datatype/type_extent.c
+++ b/src/mpi/datatype/type_extent.c
@@ -52,7 +52,6 @@ The replacement for this routine is 'MPI_Type_get_extent'.
 int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_EXTENT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -70,14 +69,16 @@ int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent)
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_free.c b/src/mpi/datatype/type_free.c
index 45b5784..b8d8170 100644
--- a/src/mpi/datatype/type_free.c
+++ b/src/mpi/datatype/type_free.c
@@ -71,7 +71,6 @@ it clear that it is an error to free a null datatype.
 int MPI_Type_free(MPI_Datatype *datatype)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_FREE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -91,14 +90,13 @@ int MPI_Type_free(MPI_Datatype *datatype)
     }
 #   endif
     
-    /* Validate parameters, especially handles needing to be converted */
-    MPID_Datatype_get_ptr( *datatype, datatype_ptr );
-    
     /* Convert MPI object handles to object pointers */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
 	    /* Check for built-in type */
 	    if (HANDLE_GET_KIND(*datatype) == HANDLE_KIND_BUILTIN) {
 		mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
@@ -125,6 +123,9 @@ int MPI_Type_free(MPI_Datatype *datatype)
 						  "**dtypeperm", 0);
 		goto fn_fail;
 	    }
+            /* Validate parameters, especially handles needing to be converted */
+            MPID_Datatype_get_ptr( *datatype, datatype_ptr );
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_get_contents.c b/src/mpi/datatype/type_get_contents.c
index 7813167..279f416 100644
--- a/src/mpi/datatype/type_get_contents.c
+++ b/src/mpi/datatype/type_get_contents.c
@@ -59,7 +59,6 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
 {
     static const char FCNAME[] = "MPI_Type_get_contents";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_CONTENTS);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -78,14 +77,13 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
     }
 #   endif
     
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
 	    /* Check for built-in type */
 	    if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) {
 		mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
@@ -113,6 +111,9 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
 		goto fn_fail;
 	    }
 
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If comm_ptr is not value, it will be reset to null */
diff --git a/src/mpi/datatype/type_get_envelope.c b/src/mpi/datatype/type_get_envelope.c
index 27f5365..1c94153 100644
--- a/src/mpi/datatype/type_get_envelope.c
+++ b/src/mpi/datatype/type_get_envelope.c
@@ -90,7 +90,6 @@ int MPI_Type_get_envelope(MPI_Datatype datatype,
 			  int *combiner)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_ENVELOPE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -108,14 +107,16 @@ int MPI_Type_get_envelope(MPI_Datatype datatype,
     }
 #   endif
     
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr( datatype, datatype_ptr );
-    
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr( datatype, datatype_ptr );
+
 	    /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If comm_ptr is not value, it will be reset to null */
diff --git a/src/mpi/datatype/type_get_extent.c b/src/mpi/datatype/type_get_extent.c
index 4e68ab2..c3d3bc6 100644
--- a/src/mpi/datatype/type_get_extent.c
+++ b/src/mpi/datatype/type_get_extent.c
@@ -64,7 +64,6 @@ Output Parameters:
 int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_EXTENT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -82,14 +81,16 @@ int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_get_true_extent.c b/src/mpi/datatype/type_get_true_extent.c
index 0f59ff4..d0d0093 100644
--- a/src/mpi/datatype/type_get_true_extent.c
+++ b/src/mpi/datatype/type_get_true_extent.c
@@ -66,7 +66,6 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
 			     MPI_Aint *true_extent)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -84,14 +83,16 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_lb.c b/src/mpi/datatype/type_lb.c
index c9fba78..09935b2 100644
--- a/src/mpi/datatype/type_lb.c
+++ b/src/mpi/datatype/type_lb.c
@@ -69,7 +69,6 @@ The replacement for this routine is 'MPI_Type_Get_extent'.
 int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_LB);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -87,14 +86,16 @@ int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement)
     }
 #   endif
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_size.c b/src/mpi/datatype/type_size.c
index 4983c7d..c1e57c5 100644
--- a/src/mpi/datatype/type_size.c
+++ b/src/mpi/datatype/type_size.c
@@ -52,7 +52,6 @@ Output Parameters:
 int MPI_Type_size(MPI_Datatype datatype, int *size)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
     MPI_Count size_x = MPI_UNDEFINED;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_SIZE);
 
@@ -78,14 +77,16 @@ int MPI_Type_size(MPI_Datatype datatype, int *size)
 	goto fn_exit;
     }
 
-    /* Convert MPI object handles to object pointers */
-    MPID_Datatype_get_ptr( datatype, datatype_ptr );
-
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
+            MPID_Datatype *datatype_ptr = NULL;
+
+            /* Convert MPI object handles to object pointers */
+            MPID_Datatype_get_ptr( datatype, datatype_ptr );
+
             /* Validate datatype_ptr */
             MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;

http://git.mpich.org/mpich.git/commitdiff/44aa78991748cd20399f0e987d4c98e4a473e81c

commit 44aa78991748cd20399f0e987d4c98e4a473e81c
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Fri Nov 15 17:39:46 2013 -0600

    Fix warnings in initcxx.cxx with Portland compiler
    
    Fixes the following warnings:
    
    "src/binding/cxx/initcxx.cxx", line 444: warning: missing return statement at
    end of non-void function "MPI::MPIR_Comm_delete_attr_cxx_proxy"
    
    "src/binding/cxx/initcxx.cxx", line 496: warning: missing return statement at
    end of non-void function "MPI::MPIR_Comm_copy_attr_cxx_proxy"
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index c6d2ebc..88ee212 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -2394,7 +2394,11 @@ if ($do_DistGraphComm) {
     }
 EOT
 }
-
+else {
+    print $OUTFD <<EOT;
+    else return MPI_ERR_INTERN;
+EOT
+}
     print $OUTFD <<EOT;
 }
 static
@@ -2459,6 +2463,11 @@ else
     }
 EOT
 }
+else {
+    print $OUTFD <<EOT;
+    else return MPI_ERR_INTERN;
+EOT
+}
     print $OUTFD <<EOT;
 }
 

http://git.mpich.org/mpich.git/commitdiff/6ca3ae6c359b734555eb4eb1d325b16c32a0da9b

commit 6ca3ae6c359b734555eb4eb1d325b16c32a0da9b
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Fri Nov 15 17:37:49 2013 -0600

    Fix warnings in initcxx.cxx with Portland compiler
    
    Fixes the following warnings:
    
    "src/binding/cxx/initcxx.cxx", line 721: warning: variable "err" was set but
    never used
    
    "src/binding/cxx/initcxx.cxx", line 745: warning: variable "err" was set but
    never used
    
    "src/binding/cxx/initcxx.cxx", line 770: warning: variable "err" was set but
    never used
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index af42e5d..c6d2ebc 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -2706,7 +2706,6 @@ Errhandler Win::Create_errhandler( Errhandler_function *f )
 // cover the ERRORS_THROW_EXCEPTIONS case.
 void Comm::Call_errhandler( int errorcode ) const
 {
-    int err;
     // we must free the Errhandler object returned from Get_errhandler because
     // Get_errhandler adds a reference (the MPI Standard says as though a new
     // object were created)
@@ -2725,12 +2724,11 @@ void Comm::Call_errhandler( int errorcode ) const
     else {
         current.Free();
     }
-    err = MPI_Comm_call_errhandler( (MPI_Comm) the_real_comm, errorcode );
+    MPI_Comm_call_errhandler( (MPI_Comm) the_real_comm, errorcode );
 }
 
 void Win::Call_errhandler( int errorcode ) const
 {
-    int err;
     // we must free the Errhandler object returned from Get_errhandler because
     // Get_errhandler adds a reference (the MPI Standard says as though a new
     // object were created)
@@ -2749,13 +2747,12 @@ void Win::Call_errhandler( int errorcode ) const
     else {
         current.Free();
     }
-    err = MPI_Win_call_errhandler( (MPI_Win) the_real_win, errorcode );
+    MPI_Win_call_errhandler( (MPI_Win) the_real_win, errorcode );
 }
 
 #ifdef MPI_MODE_RDONLY
 void File::Call_errhandler( int errorcode ) const
 {
-    int err;
     // we must free the Errhandler object returned from Get_errhandler because
     // Get_errhandler adds a reference (the MPI Standard says as though a new
     // object were created)
@@ -2768,7 +2765,7 @@ void File::Call_errhandler( int errorcode ) const
     else {
         current.Free();
     }
-    err = MPI_File_call_errhandler( (MPI_File) the_real_file, errorcode );
+    MPI_File_call_errhandler( (MPI_File) the_real_file, errorcode );
 }
 #endif // IO
 

http://git.mpich.org/mpich.git/commitdiff/2225f092efe8b8836d8a2c6292fb6dd456a39ef3

commit 2225f092efe8b8836d8a2c6292fb6dd456a39ef3
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Wed Nov 6 16:30:15 2013 -0600

    Fix compiler warning in socksm.c
    
    Fixes the following warnings when compiling socksm.c with --enable-strict:
    
    src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c: In function
    'alloc_sc_plfd_tbls':
    
    src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:183:5: warning: the
    comparison will always evaluate as 'true' for the address of
    'MPID_nem_tcp_g_lstn_sc' will never be NULL [-Waddress]
    
    src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:184:5: warning: the
    comparison will always evaluate as 'true' for the address of
    'MPID_nem_tcp_g_lstn_plfd' will never be NULL [-Waddress]
    
    Reported in ticket #1966
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index 9269b5a..646471a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -180,8 +180,8 @@ static int alloc_sc_plfd_tbls (void)
     if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP (mpi_errno);
 
     MPIU_Assert(0 == idx); /* assumed in other parts of this file */
-    MPIU_Memcpy (&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc));
-    MPIU_Memcpy (&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, sizeof(MPID_nem_tcp_g_lstn_plfd));
+    MPIUI_Memcpy (&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc));
+    MPIUI_Memcpy (&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, sizeof(MPID_nem_tcp_g_lstn_plfd));
     MPIU_Assert(MPID_nem_tcp_plfd_tbl[idx].fd == g_sc_tbl[idx].fd);
     MPIU_Assert(MPID_nem_tcp_plfd_tbl[idx].events == POLLIN);
 

http://git.mpich.org/mpich.git/commitdiff/583e3f0a8f0e9d8acaaea2de4722110c78c8e32b

commit 583e3f0a8f0e9d8acaaea2de4722110c78c8e32b
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Wed Nov 6 16:23:42 2013 -0600

    Fix warnings in ch3u_rma_acc_ops and ch3u_rma_ops
    
    Fixes the following warnings (with --enable-strict):
    
    src/mpid/ch3/src/ch3u_rma_acc_ops.c: In function 'MPIDI_Get_accumulate':
    src/mpid/ch3/src/ch3u_rma_acc_ops.c:31:5: warning: unused variable
    'mpiu_chklmem_stk_sz_' [-Wunused-variable]
    
    src/mpid/ch3/src/ch3u_rma_ops.c: In function 'MPIDI_Accumulate':
    src/mpid/ch3/src/ch3u_rma_ops.c:350:5: warning: unused variable
    'mpiu_chklmem_stk_sz_' [-Wunused-variable]
    
    See ticket #1966
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index 5e8005e..cc5ec8f 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -26,7 +26,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPIDI_VC_t *orig_vc, *target_vc;
-    MPIU_CHKLMEM_DECL(2);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
 
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
@@ -121,7 +120,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
     }
 
  fn_exit:
-    MPIU_CHKLMEM_FREEALL();
     MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE);
     return mpi_errno;
 
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 64dc836..eda8201 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -345,7 +345,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPIDI_VC_t *orig_vc, *target_vc;
-    MPIU_CHKLMEM_DECL(2);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
     
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
@@ -453,7 +452,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
     }
 
  fn_exit:
-    MPIU_CHKLMEM_FREEALL();
     MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACCUMULATE);
     return mpi_errno;
 

-----------------------------------------------------------------------

Summary of changes:
 src/binding/cxx/buildiface                         |   20 +++++++++++++-------
 src/include/mpiimplthreadpost.h                    |    2 +-
 src/mpi/attr/comm_free_keyval.c                    |    9 +++++----
 src/mpi/attr/comm_set_attr.c                       |   10 ++++++----
 src/mpi/attr/keyval_free.c                         |    9 +++++----
 src/mpi/coll/iallgatherv.c                         |    2 +-
 src/mpi/coll/ibcast.c                              |    6 +++---
 src/mpi/coll/ireduce.c                             |    2 +-
 src/mpi/datatype/get_elements.c                    |    8 ++++----
 src/mpi/datatype/pack_external_size.c              |    9 +++++----
 src/mpi/datatype/pack_size.c                       |    8 +++++---
 src/mpi/datatype/type_commit.c                     |    9 +++++----
 src/mpi/datatype/type_create_subarray.c            |    8 +++++---
 src/mpi/datatype/type_extent.c                     |    9 +++++----
 src/mpi/datatype/type_free.c                       |    9 +++++----
 src/mpi/datatype/type_get_contents.c               |    9 +++++----
 src/mpi/datatype/type_get_envelope.c               |    9 +++++----
 src/mpi/datatype/type_get_extent.c                 |    9 +++++----
 src/mpi/datatype/type_get_true_extent.c            |    9 +++++----
 src/mpi/datatype/type_lb.c                         |    9 +++++----
 src/mpi/datatype/type_match_size.c                 |    8 ++++++++
 src/mpi/datatype/type_size.c                       |    9 +++++----
 src/mpi/romio/adio/common/ad_coll_build_req_new.c  |    3 +--
 src/mpi/topo/inhb_allgather.c                      |    5 +----
 src/mpi/topo/inhb_alltoall.c                       |    7 ++-----
 src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c  |    6 +++---
 src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c |    2 +-
 src/mpid/ch3/src/ch3u_handle_recv_req.c            |    2 +-
 src/mpid/ch3/src/ch3u_recvq.c                      |    2 +-
 src/mpid/ch3/src/ch3u_rma_acc_ops.c                |    2 --
 src/mpid/ch3/src/ch3u_rma_ops.c                    |    2 --
 .../common/datatype/dataloop/dataloop_create.c     |    2 +-
 src/mpid/common/datatype/mpid_type_debug.c         |    2 +-
 src/mpid/common/datatype/mpir_type_flatten.c       |    2 +-
 .../tools/topo/hwloc/hwloc/src/topology-linux.c    |    2 +-
 .../tools/topo/hwloc/hwloc/src/topology-xml.c      |    2 +-
 36 files changed, 122 insertions(+), 101 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list