Removed some more "statement not reached" warnings.
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Feb 2008 12:52:08 +0000 (12:52 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Feb 2008 12:52:08 +0000 (12:52 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24283 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c
capture_opts.c
gtk/capture_dlg.c
gtk/mgcp_stat.c
gtk/radius_stat.c
gtk/tcp_graph.c
tap-h225counter.c
tap-h225rassrt.c
tap-mgcpstat.c
tap-radiusstat.c

index b0efea16724d09c573c34e46c109b24158f106fd..d615a4e4bdde2f609080c37d1ac06ba0814f07de 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -324,7 +324,6 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file)
       g_free(capture_opts->save_file);
       capture_opts->save_file = NULL;
       return FALSE;
-      break;
     }
   }
 
index a72f6c88f007775401d3762595ddd9f333ce4a9b..600d8c0a8f38c66061cb5da57deca6440d771e0b 100644 (file)
@@ -540,7 +540,6 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg,
 #endif
         status = capture_opts_output_to_pipe(capture_opts->save_file, &capture_opts->output_to_pipe);
         return status;
-        break;
     case 'y':        /* Set the pcap data link type */
 #ifdef HAVE_PCAP_DATALINK_NAME_TO_VAL
         capture_opts->linktype = linktype_name_to_val(optarg);
index ebe1f9c010f88314224501497c979bb8e14800a8..5d88d7869c833488070c01cabf850dfb91aa3862 100644 (file)
@@ -448,16 +448,12 @@ guint32 value)
     switch(unit) {
     case(TIME_UNIT_SECOND):
         return value;
-        break;
     case(TIME_UNIT_MINUTE):
         return value * 60;
-        break;
     case(TIME_UNIT_HOUR):
         return value * 60 * 60;
-        break;
     case(TIME_UNIT_DAY):
         return value * 60 * 60 * 24;
-        break;
     default:
         g_assert_not_reached();
         return 0;
@@ -543,21 +539,18 @@ guint32 value)
     switch(unit) {
     case(SIZE_UNIT_KILOBYTES):
         return value;
-        break;
     case(SIZE_UNIT_MEGABYTES):
         if(value > G_MAXINT / 1024) {
             return 0;
         } else {
             return value * 1024;
         }
-        break;
     case(SIZE_UNIT_GIGABYTES):
         if(value > G_MAXINT / (1024 * 1024)) {
             return 0;
         } else {
             return value * 1024 * 1024;
         }
-        break;
     default:
         g_assert_not_reached();
         return 0;
index 9c4b8b9b0d22b1bd09cdf96b396355b509c75255..7fe9f62a0d4f55eb546f9083ffbf2ef79ec87457 100644 (file)
@@ -118,6 +118,7 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
        mgcpstat_t *ms=(mgcpstat_t *)pms;
        const mgcp_info_t *mi=pmi;
        nstime_t delta;
+       int ret = 0;
 
        switch (mi->mgcp_type) {
 
@@ -125,24 +126,20 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
                if(mi->is_duplicate){
                        /* Duplicate is ignored */
                        ms->req_dup_num++;
-                       return 0;
                }
                else {
                        ms->open_req_num++;
-                       return 0;
                }
-       break;
+               break;
 
        case MGCP_RESPONSE:
                if(mi->is_duplicate){
                        /* Duplicate is ignored */
                        ms->rsp_dup_num++;
-                       return 0;
                }
                else if (!mi->request_available) {
                        /* no request was seen */
                        ms->disc_rsp_num++;
-                       return 0;
                }
                else {
                        ms->open_req_num--;
@@ -180,14 +177,15 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
                                time_stat_update(&(ms->rtd[9]),&delta, pinfo);
                        }
 
-                       return 1;
+                       ret = 1;
                }
-       break;
+               break;
 
        default:
-               return 0;
-       break;
+               break;
        }
+
+       return ret;
 }
 
 static void
index 3c1ba8a2a45da936de031fd6cc2ee116c5a4cd01..d1c25b103349ad1386dffb8d420f7e03e362a77a 100644 (file)
@@ -131,6 +131,7 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
        const radius_info_t *ri=pri;
        nstime_t delta;
        radius_category radius_cat = OTHERS;
+       int ret = 0;
 
        switch (ri->code) { 
                case RADIUS_ACCESS_REQUEST:
@@ -175,14 +176,12 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                        /* Duplicate is ignored */
                        rs->radius_rtd[OVERALL].req_dup_num++;
                        rs->radius_rtd[radius_cat].req_dup_num++;
-                       return 0;
                }
                else {
                        rs->radius_rtd[OVERALL].open_req_num++;
                        rs->radius_rtd[radius_cat].open_req_num++;
-                       return 0;
                }
-       break;
+               break;
 
        case RADIUS_ACCESS_ACCEPT:
        case RADIUS_ACCESS_REJECT:
@@ -198,13 +197,11 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                        /* Duplicate is ignored */
                        rs->radius_rtd[OVERALL].rsp_dup_num++;
                        rs->radius_rtd[radius_cat].rsp_dup_num++;
-                       return 0;
                }
                else if (!ri->request_available) {
                        /* no request was seen */
                        rs->radius_rtd[OVERALL].disc_rsp_num++;
                        rs->radius_rtd[radius_cat].disc_rsp_num++;
-                       return 0;
                }
                else {
                        rs->radius_rtd[OVERALL].open_req_num--;
@@ -215,14 +212,15 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                        time_stat_update(&(rs->radius_rtd[OVERALL].stats),&delta, pinfo);
                        time_stat_update(&(rs->radius_rtd[radius_cat].stats),&delta, pinfo);
 
-                       return 1;
+                       ret = 1;
                }
-       break;
+               break;
 
        default:
-               return 0;
-       break;
+               break;
        }
+
+       return ret;
 }
 
 static void
index b423671aa46665ff14f552e169d14cfdb0cc1256..4dca66611b4c3b1bb84340c81fdd9883d78eb6b9 100644 (file)
@@ -2561,7 +2561,6 @@ static int get_label_dim (struct axis *axis, int dir, double label)
        default:
                puts ("initialize axis: an axis must be either horizontal or vertical");
                return -1;
-               break;
        }
        return dim;
 }
@@ -2571,13 +2570,10 @@ static double axis_zoom_get (struct axis *axis, int dir)
        switch (dir) {
        case AXIS_HORIZONTAL:
                return axis->g->zoom.x;
-               break;
        case AXIS_VERTICAL:
                return axis->g->zoom.y;
-               break;
        default:
                return -1;
-               break;
        }
 }
 
index bafc80ba327345dc881ce719808fe55a9f4b6cfd..2f4b6e3af872810511b831aa3225637657b75d67 100644 (file)
@@ -225,7 +225,6 @@ h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c
 
        default:
                return 0;
-               break;
        }
 
        return 1;
index 385ccc4cf018775e601d383012d033123ec84c2d..67a688794c45c50a7dd3d396471e1e066cb7bc58 100644 (file)
@@ -169,7 +169,6 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
 
        default:
                return 0;
-               break;
        }
        return 1;
 }
index 967f9d9260bd71ac8b9b9b6e732f22561d5caee2..745dbd64e9cedd1ad3e978357df0cc30327f4561 100644 (file)
@@ -76,6 +76,7 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
        mgcpstat_t *ms=(mgcpstat_t *)pms;
        const mgcp_info_t *mi=pmi;
        nstime_t delta;
+       int ret = 0;
 
        switch (mi->mgcp_type) {
 
@@ -83,24 +84,20 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
                if(mi->is_duplicate){
                        /* Duplicate is ignored */
                        ms->req_dup_num++;
-                       return 0;
                }
                else {
                        ms->open_req_num++;
-                       return 0;
                }
-       break;
+               break;
 
        case MGCP_RESPONSE:
                if(mi->is_duplicate){
                        /* Duplicate is ignored */
                        ms->rsp_dup_num++;
-                       return 0;
                }
                else if (!mi->request_available) {
                        /* no request was seen */
                        ms->disc_rsp_num++;
-                       return 0;
                }
                else {
                        ms->open_req_num--;
@@ -140,14 +137,15 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
                                time_stat_update(&(ms->rtd[10]),&delta, pinfo);
                        }
 
-                       return 1;
+                       ret = 1;
                }
-       break;
+               break;
 
        default:
-               return 0;
-       break;
+               break;
        }
+
+       return ret;
 }
 
 static void
index 1730c04e427308309c3f8a4cf26dd8e26572cbfd..fc560b94e901a272729c4b2716e1da6a65a7f7b3 100644 (file)
@@ -70,6 +70,7 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
        radiusstat_t *rs=(radiusstat_t *)prs;
        const radius_info_t *ri=pri;
        nstime_t delta;
+       int ret = 0;
 
        switch (ri->code) {
 
@@ -82,13 +83,11 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                if(ri->is_duplicate){
                        /* Duplicate is ignored */
                        rs->req_dup_num++;
-                       return 0;
                }
                else {
                        rs->open_req_num++;
-                       return 0;
                }
-       break;
+               break;
 
        case RADIUS_ACCESS_ACCEPT:
        case RADIUS_ACCESS_REJECT:
@@ -103,12 +102,10 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                if(ri->is_duplicate){
                        /* Duplicate is ignored */
                        rs->rsp_dup_num++;
-                       return 0;
                }
                else if (!ri->request_available) {
                        /* no request was seen */
                        rs->disc_rsp_num++;
-                       return 0;
                }
                else {
                        rs->open_req_num--;
@@ -122,21 +119,19 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                        else if (ri->code == RADIUS_ACCOUNTING_RESPONSE) {
                                time_stat_update(&(rs->rtd[2]),&delta, pinfo);
                        }
-
-
-
                        else {
                                time_stat_update(&(rs->rtd[7]),&delta, pinfo);
                        }
 
-                       return 1;
+                       ret = 1;
                }
-       break;
+               break;
 
        default:
-               return 0;
-       break;
+               break;
        }
+
+       return ret;
 }
 
 static void