SNAPC/CRCP/SSTORE: remove compiler warnings
authorAdrian Reber <adrian.reber@hs-esslingen.de>
Mon, 27 Jan 2014 11:49:30 +0000 (12:49 +0100)
committerAdrian Reber <adrian.reber@hs-esslingen.de>
Wed, 29 Jan 2014 16:34:35 +0000 (17:34 +0100)
ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c
orte/mca/snapc/full/snapc_full_global.c
orte/mca/snapc/full/snapc_full_local.c
orte/mca/sstore/central/sstore_central_global.c

index 50f01cd..31f9fdb 100644 (file)
@@ -3301,7 +3301,7 @@ static int traffic_message_move(ompi_crcp_bkmrk_pml_traffic_message_ref_t *old_m
                                 bool keep_active,
                                 bool remove)
 {
-    int ret, exit_status = OMPI_SUCCESS;
+    int ret;
     ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL;
     ompi_request_t *request = NULL;
     bool loc_already_drained = false;
@@ -3366,7 +3366,7 @@ static int traffic_message_move(ompi_crcp_bkmrk_pml_traffic_message_ref_t *old_m
         (*new_msg_ref)->proc_name.vpid  = to_peer_ref->proc_name.vpid;
     }
 
-    return exit_status;
+    return ret;
 }
 
 static int traffic_message_find_mark_persistent(ompi_crcp_bkmrk_pml_traffic_message_ref_t *msg_ref,
@@ -3474,7 +3474,7 @@ static int traffic_message_create_drain_message(bool post_drain,
 {
     ompi_crcp_bkmrk_pml_drain_message_ref_t *drain_msg_ref = NULL;
     ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL;
-    int m_iter, m_total, ret;
+    int m_iter, m_total;
 
     *num_posted = 0;
 
@@ -4787,9 +4787,9 @@ static void drain_message_ack_cbfunc(int status,
     }
 
     opal_output(mca_crcp_bkmrk_component.super.output_handle,
-                "crcp:bkmrk: %s --> %s ERROR: Unable to match ACK to peer\n",
+                "crcp:bkmrk: %s --> %s ERROR: Unable to match ACK to peer (%d)\n",
                 OMPI_NAME_PRINT(OMPI_PROC_MY_NAME),
-                OMPI_NAME_PRINT(sender) );
+                OMPI_NAME_PRINT(sender), exit_status);
 
  cleanup:
     return;
@@ -5327,7 +5327,6 @@ static int recv_bookmarks(int peer_idx)
 
     ++total_recv_bookmarks;
 
- cleanup:
     END_TIMER(CRCP_TIMER_CKPT_EX_PEER_R);
     /* JJH Doesn't make much sense to print this. The real bottleneck is always the send_bookmarks() */
     /*DISPLAY_INDV_TIMER(CRCP_TIMER_CKPT_EX_PEER_R, peer_idx, 1);*/
@@ -5368,13 +5367,14 @@ static void recv_bookmarks_cbfunc(int status,
     peer_ref->matched_msgs_recvd = tmp_int;
 
     OPAL_OUTPUT_VERBOSE((15, mca_crcp_bkmrk_component.super.output_handle,
-                         "crcp:bkmrk: %s <-- %s Received bookmark (S[%6d] R[%6d]) vs. (S[%6d] R[%6d])\n",
+                         "crcp:bkmrk: %s <-- %s Received bookmark (S[%6d] R[%6d]) vs. (S[%6d] R[%6d]) (%d)\n",
                          OMPI_NAME_PRINT(OMPI_PROC_MY_NAME),
                          OMPI_NAME_PRINT(sender),
                          peer_ref->matched_msgs_sent,
                          peer_ref->matched_msgs_recvd,
                          peer_ref->total_msgs_sent,
-                         peer_ref->total_msgs_recvd));
+                         peer_ref->total_msgs_recvd,
+                         exit_status));
 
  cleanup:
     --total_recv_bookmarks;
index a305c2e..bbe8b29 100644 (file)
@@ -1861,7 +1861,7 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
                                               opal_buffer_t* buffer,
                                               bool quick)
 {
-    int ret, exit_status = ORTE_SUCCESS;
+    int ret;
     orte_std_cntr_t count;
     orte_jobid_t jobid;
     int   job_ckpt_state = ORTE_SNAPC_CKPT_STATE_NONE;
@@ -1885,29 +1885,25 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
     count = 1;
     if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
+        return;
     }
 
     count = 1;
     if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
+        return;
     }
 
     if( !quick ) {
         if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
-            goto cleanup;
+            return;
         }
 
         options = OBJ_NEW(opal_crs_base_ckpt_options_t);
         if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
-            goto cleanup;
+            return;
         }
         /* In this case we want to use the current_options that are cached
          * so that we do not have to send them every time.
@@ -1917,7 +1913,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
         count = 1;
         if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
             goto cleanup;
         }
 
@@ -1925,7 +1920,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
             count = 1;
             if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) {
                 ORTE_ERROR_LOG(ret);
-                exit_status = ret;
                 goto cleanup;
             }
 
@@ -1933,7 +1927,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
                 count = 1;
                 if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc, &count, ORTE_NAME))) {
                     ORTE_ERROR_LOG(ret);
-                    exit_status = ret;
                     goto cleanup;
                 }
                 /* JJH: Update local info as needed */
@@ -1946,8 +1939,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
                                                              ss_handle,
                                                              global_snapshot.options) ) ) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
     }
 
  cleanup:
index 5a71856..1900337 100644 (file)
@@ -767,7 +767,7 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
                                                     opal_buffer_t* buffer,
                                                     bool quick)
 {
-    int ret, exit_status = ORTE_SUCCESS;
+    int ret;
     orte_jobid_t jobid;
     int job_ckpt_state;
     orte_std_cntr_t count;
@@ -793,28 +793,24 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
     count = 1;
     if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
+        return;
     }
 
     count = 1;
     if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
+        return;
     }
 
     if( !quick ) {
         if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
-            goto cleanup;
+            return;
         }
 
         options = OBJ_NEW(opal_crs_base_ckpt_options_t);
         if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
             goto cleanup;
         }
         /* In this case we want to use the current_local_options that are cached
@@ -825,7 +821,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
         count = 1;
         if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
             goto cleanup;
         }
 
@@ -835,7 +830,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
             count = 1;
             if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) {
                 ORTE_ERROR_LOG(ret);
-                exit_status = ret;
                 goto cleanup;
             }
 
@@ -843,7 +837,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
                 count = 1;
                 if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc_name, &count, ORTE_NAME))) {
                     ORTE_ERROR_LOG(ret);
-                    exit_status = ret;
                     goto cleanup;
                 }
 
@@ -871,8 +864,7 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
                                                             ss_handle,
                                                             local_global_snapshot.options)) ) {
         ORTE_ERROR_LOG(ret);
-        exit_status = ret;
-        goto cleanup;
+        return;
     }
 
  cleanup:
@@ -1697,7 +1689,7 @@ static int snapc_full_local_end_ckpt_handshake(orte_snapc_full_app_snapshot_t *v
 
 static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
 {
-    int ret, exit_status = ORTE_SUCCESS;
+    int ret;
     orte_snapc_full_app_snapshot_t *vpid_snapshot = NULL;
     int ckpt_state;
     int loc_min_state;
@@ -1718,7 +1710,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
                         "Local) Error: Unable to read state from named pipe (%s). %d\n",
                         vpid_snapshot->comm_pipe_r, ret);
             ORTE_ERROR_LOG(ORTE_ERROR);
-            exit_status = ORTE_ERROR;
             goto cleanup;
         }
 
@@ -1736,7 +1727,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
                 ORTE_SNAPC_CKPT_STATE_INC_PREPED == loc_min_state ) {
                 if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_INC_PREPED, false) ) ) {
                     ORTE_ERROR_LOG(ret);
-                    exit_status = ret;
                     goto cleanup;
                 }
             }
@@ -1764,13 +1754,11 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
                              "Local) Read Event: Flush the modex cached data\n"));
         if (OPAL_SUCCESS != (ret = opal_db.remove(NULL, NULL))) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
             goto cleanup;
         }
         orte_grpcomm.finalize();
         if (ORTE_SUCCESS != (ret = orte_grpcomm.init())) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
             goto cleanup;
         }
         flushed_modex = true;
@@ -1783,8 +1771,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
         /* JJH - The error path needs some more work */
         if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_ERROR, true) ) ) {
             ORTE_ERROR_LOG(ret);
-            exit_status = ret;
-            goto cleanup;
         }
         goto cleanup;
     }
@@ -1810,7 +1796,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
         if( ORTE_SNAPC_GLOBAL_COORD_TYPE != (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) {
             if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) {
                 ORTE_ERROR_LOG(ret);
-                exit_status = ret;
                 goto cleanup;
             }
         }
@@ -1829,7 +1814,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
             if( sstore_local_procs_finished ) {
                 if( ORTE_SUCCESS != (ret = orte_snapc_full_local_reset_coord()) ) {
                     ORTE_ERROR_LOG(ret);
-                    exit_status = ret;
                     goto cleanup;
                 }
             }
@@ -1839,7 +1823,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
         if( ORTE_SNAPC_GLOBAL_COORD_TYPE == (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) {
             if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) {
                 ORTE_ERROR_LOG(ret);
-                exit_status = ret;
                 goto cleanup;
             }
         }
index 6a58ae3..40f9578 100644 (file)
@@ -143,9 +143,6 @@ static void sstore_central_global_recv(int status,
                                        opal_buffer_t* buffer,
                                        orte_rml_tag_t tag,
                                        void* cbdata);
-static void sstore_central_global_process_cmd(int fd,
-                                              short event,
-                                              void *cbdata);
 static int process_local_pull(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info);
 static int process_local_push(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info);