SNAPC: 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>
Mon, 27 Jan 2014 15:18:08 +0000 (16:18 +0100)
orte/mca/snapc/full/snapc_full_global.c
orte/mca/snapc/full/snapc_full_local.c

index 4e8f3b1..5ab41b5 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 22466ac..7c5f4e6 100644 (file)
@@ -768,7 +768,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;
@@ -794,28 +794,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
@@ -826,7 +822,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;
         }
 
@@ -836,7 +831,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;
             }
 
@@ -844,7 +838,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;
                 }
 
@@ -872,8 +865,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:
@@ -1698,7 +1690,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;
@@ -1719,7 +1711,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;
         }
 
@@ -1737,7 +1728,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;
                 }
             }
@@ -1765,13 +1755,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;
@@ -1784,8 +1772,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;
     }
@@ -1811,7 +1797,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;
             }
         }
@@ -1830,7 +1815,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;
                 }
             }
@@ -1840,7 +1824,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;
             }
         }