diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-07 15:44:45 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-07 15:44:45 +0000 |
commit | 28ae535b009c9301e885a4e17bfa55861288f2f9 (patch) | |
tree | ffc752144b791b42bccb7d56a29504c9ebed0d65 /epan | |
parent | 36431783b7bb21c867080639724d73c929b612ec (diff) | |
download | wireshark-28ae535b009c9301e885a4e17bfa55861288f2f9.tar.gz |
Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
Diffstat (limited to 'epan')
38 files changed, 31 insertions, 117 deletions
diff --git a/epan/dissectors/packet-bctp.c b/epan/dissectors/packet-bctp.c index 8f582720e6..06ef184899 100644 --- a/epan/dissectors/packet-bctp.c +++ b/epan/dissectors/packet-bctp.c @@ -27,8 +27,8 @@ * Ref ITU-T Rec. Q.1990 (07/2001)
*/
- #ifdef HAVE_CONFIG_H
-# include "config.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
#endif
#include <glib.h>
diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c index 5b6bf76bb4..d673d75db5 100644 --- a/epan/dissectors/packet-beep.c +++ b/epan/dissectors/packet-beep.c @@ -213,7 +213,7 @@ static int dissect_beep_more(tvbuff_t *tvb, int offset, proto_tree *tree) { - + int ret = 0; switch (beep_get_more(tvb_get_guint8(tvb, offset))) { @@ -224,7 +224,7 @@ dissect_beep_more(tvbuff_t *tvb, int offset, proto_tree_add_text(tree, tvb, offset, 1, "More: Complete"); } - return 0; + ret = 0; break; @@ -235,7 +235,7 @@ dissect_beep_more(tvbuff_t *tvb, int offset, proto_tree_add_text(tree, tvb, offset, 1, "More: Intermediate"); } - return 1; + ret = 1; break; @@ -246,11 +246,12 @@ dissect_beep_more(tvbuff_t *tvb, int offset, proto_tree_add_text(tree, tvb, offset, 1, "PROTOCOL VIOLATION: Expected More Flag (* or .)"); } - return -1; + ret = -1; break; } + return ret; } #if 0 diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index b9c93dfe4a..2bf1375959 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -2712,7 +2712,6 @@ printf("CHOICE dissect_ber_choice(%s) trying again\n",name); } } return end_offset; - break; } ch++; } @@ -2943,7 +2942,6 @@ printf("CHOICE dissect_ber_old_choice(%s) trying again\n",name); } } return end_offset; - break; } ch++; } diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c index 530e92ea6c..c68b96b4cb 100644 --- a/epan/dissectors/packet-bfd.c +++ b/epan/dissectors/packet-bfd.c @@ -287,7 +287,7 @@ static void dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_ proto_item *ti; proto_item *auth_item; proto_tree *auth_tree; - char *password; + guint8 *password; auth_type = tvb_get_guint8(tvb, offset); auth_len = tvb_get_guint8(tvb, offset + 1); diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index e8c0bca352..a36e37518e 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -677,7 +677,6 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff, } consumed = i; return consumed; - break; case 255: /* End Option */ if (!first_pass) { diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c index 6e50f5601c..7564f5998a 100644 --- a/epan/dissectors/packet-bssap.c +++ b/epan/dissectors/packet-bssap.c @@ -1735,8 +1735,6 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; - - break; case BSSAP_LOCATION_UPDATE_REQUEST: /* 17.1.11 BSSAP+-LOCATION-UPDATE-REQUEST */ /* IMSI IMSI 18.4.10 M TLV 6-10 */ if ( check_ie(tvb, tree, &offset, BSSAP_IMSI)) @@ -1987,7 +1985,6 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* VLR number VLR number 18.4.26 C TLV 5-11 */ if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){ offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); - return; if (tvb_length_remaining(tvb,offset) == 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); @@ -2007,7 +2004,6 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* VLR number VLR number 18.4.26 C TLV 5-11 */ if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){ offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); - return; if (tvb_length_remaining(tvb,offset) == 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c index b4caf9052e..a8948034ee 100644 --- a/epan/dissectors/packet-bvlc.c +++ b/epan/dissectors/packet-bvlc.c @@ -48,7 +48,7 @@ * configured locally to a different value without it being considered * a violation of this protocol. */ -static int additional_bvlc_udp_port = 0; +static guint additional_bvlc_udp_port = 0; static int proto_bvlc = -1; static int hf_bvlc_type = -1; @@ -428,7 +428,7 @@ proto_reg_handoff_bvlc(void) { static int bvlc_initialized = FALSE; static dissector_handle_t bvlc_handle; - static int bvlc_udp_port; + static guint bvlc_udp_port; if (!bvlc_initialized) { diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c index 8575e05713..18cfc2ec50 100644 --- a/epan/dissectors/packet-clnp.c +++ b/epan/dissectors/packet-clnp.c @@ -845,8 +845,6 @@ static int ositp_decode_DR(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, case (2): str = "Session entity not attached to TSAP"; break; case (3): str = "Address unknown"; break; default: return -1; - /*NOTREACHED*/ - break; } if (check_col(pinfo->cinfo, COL_INFO)) @@ -961,8 +959,6 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, default : /* bad TPDU */ return -1; - /*NOTREACHED*/ - break; } pinfo->clnp_dstref = dst_ref; @@ -1155,8 +1151,6 @@ static int ositp_decode_ED(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, default : /* bad TPDU */ return -1; - /*NOTREACHED*/ - break; } /* li */ dst_ref = tvb_get_ntohs(tvb, offset + P_DST_REF); @@ -1234,8 +1228,6 @@ static int ositp_decode_RJ(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, break; default : return -1; - /*NOTREACHED*/ - break; } dst_ref = tvb_get_ntohs(tvb, offset + P_DST_REF); @@ -1571,8 +1563,6 @@ static int ositp_decode_EA(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, default : /* bad TPDU */ return -1; - /*NOTREACHED*/ - break; } /* li */ dst_ref = tvb_get_ntohs(tvb, offset + P_DST_REF); @@ -1650,8 +1640,6 @@ static int ositp_decode_ER(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, break; default: return -1; - /*NOTREACHED*/ - break; } dst_ref = tvb_get_ntohs(tvb, offset + P_DST_REF); diff --git a/epan/dissectors/packet-cpha.c b/epan/dissectors/packet-cpha.c index 861d0d972c..636142515a 100644 --- a/epan/dissectors/packet-cpha.c +++ b/epan/dissectors/packet-cpha.c @@ -439,19 +439,13 @@ static const char * version2str(guint16 version) { switch(version) { case 1: return "4.1"; - break; case 6: return "NG Feature Pack 2"; - break; case 530: return "NG Feature Pack 3"; - break; case 540: return "NG with Application Intelligence (Early Availability)"; - break; case 541: return "NG with Application Intelligence"; - break; - default: return "Unknown Version"; - break; + default: break; } - return NULL; + return "Unknown Version"; } static const char * opcode2str_short(guint16 opcode) { diff --git a/epan/dissectors/packet-dcp.c b/epan/dissectors/packet-dcp.c index 89e671b68b..1f768eb10c 100644 --- a/epan/dissectors/packet-dcp.c +++ b/epan/dissectors/packet-dcp.c @@ -914,7 +914,6 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(tree) proto_tree_add_text(dcp_tree, tvb, offset, -1, "Reserved packet type: unable to dissect further"); return; - break; } diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 4d1d393c84..4c6aaeb890 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1198,7 +1198,6 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, proto_tree_add_text(rr_tree, tvb, cur_offset, pname_len, "Domain name: %s", name_out); } - break; } break; @@ -1311,7 +1310,6 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, proto_tree_add_text(rr_tree, tvb, os_offset, 1 + os_len, "OS: %.*s", os_len, os); } - break; } break; diff --git a/epan/dissectors/packet-enrp.c b/epan/dissectors/packet-enrp.c index 372702eba4..ad90e04478 100644 --- a/epan/dissectors/packet-enrp.c +++ b/epan/dissectors/packet-enrp.c @@ -189,7 +189,6 @@ dissect_error_cause(tvbuff_t *cause_tvb, proto_tree *parameter_tree) message_tvb = tvb_new_subset(cause_tvb, CAUSE_INFO_OFFSET, -1, -1); dissect_enrp(message_tvb, NULL, cause_tree); break; - break; case INVALID_VALUES: parameter_tvb = tvb_new_subset(cause_tvb, CAUSE_INFO_OFFSET, -1, -1); dissect_parameter(parameter_tvb, cause_tree); diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index 5dcbdeacca..49fb89ba2d 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -254,7 +254,6 @@ fddifc_to_str(int fc) g_snprintf(strbuf, sizeof(strbuf), "Implementor sync frame, control %x", fc & FDDI_FC_ZZZZ); return strbuf; - break; default: return "Unknown frame type"; diff --git a/epan/dissectors/packet-ff.c b/epan/dissectors/packet-ff.c index 906eef16d7..b31a90ccfe 100644 --- a/epan/dissectors/packet-ff.c +++ b/epan/dissectors/packet-ff.c @@ -1753,48 +1753,37 @@ val_to_str_err_code(guint8 class, guint8 code) switch(class) { case 1: return(val_to_str(code, names_err_code_vfd_state, "Unknown")); - break; case 2: return(val_to_str(code, names_err_code_appl_ref, "Unknown")); - break; case 3: return(val_to_str(code, names_err_code_def, "Unknown")); - break; case 4: return(val_to_str(code, names_err_code_res, "Unknown")); - break; case 5: return(val_to_str(code, names_err_code_srv, "Unknown")); - break; case 6: return(val_to_str(code, names_err_code_access, "Unknown")); - break; case 7: return(val_to_str(code, names_err_code_od, "Unknown")); - break; case 8: return(val_to_str(code, names_err_code_other, "Unknown")); - break; case 9: return(val_to_str(code, names_err_code_reject, "Unknown")); - break; case 10: return(val_to_str(code, names_err_code_h1_sm_reason_code, "Unknown")); - break; case 11: return(val_to_str(code, names_err_code_fms_init, "Unknown")); - break; default: return("Unknown"); diff --git a/epan/dissectors/packet-fmp.c b/epan/dissectors/packet-fmp.c index 3d72d478f6..e0aadc7c76 100644 --- a/epan/dissectors/packet-fmp.c +++ b/epan/dissectors/packet-fmp.c @@ -705,8 +705,6 @@ dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval) case FMP_WRITER_ZEROED_BLK: *rval = 0; break; - *rval = 1; - break; case FMP_WRONG_HANDLE: *rval = 0; break; diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index 205ee6db22..1c44f51c89 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -266,7 +266,7 @@ parse_extended_pasv_response(const guchar *line, int linelen, guint16 *ftp_port) delimiter = c; } if (c != delimiter) { - break;; + break; } p++; } diff --git a/epan/dissectors/packet-gsm_a.c b/epan/dissectors/packet-gsm_a.c index fc8ac85180..3e2d40d03d 100644 --- a/epan/dissectors/packet-gsm_a.c +++ b/epan/dissectors/packet-gsm_a.c @@ -6152,7 +6152,6 @@ de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar str = "Reserved"; break; } - break; } else { @@ -6165,7 +6164,6 @@ de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar str = "Reserved"; break; } - break; } break; @@ -18470,8 +18468,7 @@ dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) default: /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */ - return; - break; + return; } /* @@ -18746,8 +18743,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) default: /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */ - return; - break; + return; } sccp_msg = pinfo->sccp_info; diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c index 3d966e3c8b..16946f8c8f 100644 --- a/epan/dissectors/packet-gsm_sms.c +++ b/epan/dissectors/packet-gsm_sms.c @@ -1533,17 +1533,17 @@ char_def_alphabet_ext_decode(unsigned char value) { switch (value) { - case 0x0a: return 0x0c; break; /* form feed */ - case 0x14: return '^'; break; - case 0x28: return '{'; break; - case 0x29: return '}'; break; - case 0x2f: return '\\'; break; - case 0x3c: return '['; break; - case 0x3d: return '~'; break; - case 0x3e: return ']'; break; - case 0x40: return '|'; break; - case 0x65: return 0x20ac; break; /* euro */ - default: return '?'; break; /* invalid character */ + case 0x0a: return 0x0c; /* form feed */ + case 0x14: return '^'; + case 0x28: return '{'; + case 0x29: return '}'; + case 0x2f: return '\\'; + case 0x3c: return '['; + case 0x3d: return '~'; + case 0x3e: return ']'; + case 0x40: return '|'; + case 0x65: return 0x20ac; /* euro */ + default: return '?'; /* invalid character */ } } diff --git a/epan/dissectors/packet-h1.c b/epan/dissectors/packet-h1.c index c088f83fe6..0719b2a41b 100644 --- a/epan/dissectors/packet-h1.c +++ b/epan/dissectors/packet-h1.c @@ -238,7 +238,6 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* This is not a valid telegram. So cancel dissection and try the next dissector */ return FALSE; - break; } if (tvb_get_guint8(tvb,offset + position + 1) < 1) THROW(ReportedBoundsError); diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c index 2cd86d7fe4..91d4986551 100644 --- a/epan/dissectors/packet-h223.c +++ b/epan/dissectors/packet-h223.c @@ -183,7 +183,7 @@ static gint circuit_chain_equal(gconstpointer v, gconstpointer w) gint result; result = ( v1->call == v2->call && v1->vc == v2 -> vc ); - return result;; + return result; } static guint circuit_chain_hash (gconstpointer v) @@ -1142,7 +1142,6 @@ static gboolean h223_mux_check_hdlc(int h223_level, guint32 nbytes, guint32 tail /* level 0 isn't byte-aligned, so is a complete pain to implement */ DISSECTOR_ASSERT_NOT_REACHED(); return FALSE; - break; case 1: masked = tail_buf & 0xffff; diff --git a/epan/dissectors/packet-h264.c b/epan/dissectors/packet-h264.c index 13eb4b4847..3a19158a53 100644 --- a/epan/dissectors/packet-h264.c +++ b/epan/dissectors/packet-h264.c @@ -411,7 +411,6 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint } } return codenum; - break; default: break; } @@ -1346,7 +1345,6 @@ dissect_h264_pic_parameter_set_rbsp(proto_tree *tree, tvbuff_t *tvb, packet_info /* else*/ /* scaling_list( ScalingList8x8[ i - 6 ], 64, UseDefaultScalingMatrix8x8Flag[ i - 6 ] )*/ /* }*/ - proto_tree_add_text(tree, tvb, bit_offset>>3, -1, "[Not decoded yet]"); } /* second_chroma_qp_index_offset 1 se(v)*/ diff --git a/epan/dissectors/packet-icap.c b/epan/dissectors/packet-icap.c index 390325fbe3..e9b23da6a6 100644 --- a/epan/dissectors/packet-icap.c +++ b/epan/dissectors/packet-icap.c @@ -205,7 +205,6 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ is_icap = TRUE; goto is_icap_header; - break; } } diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 613066eaa8..ccec90d70f 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -619,7 +619,6 @@ again: ip6_to_str(&opt_nr->fmip6_opt_prefix)); break; } - break; case FMIP6_OPT_LINK_LAYER_ADDRESS: { int len, p; diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c index 5b98b5348a..cd7d72206e 100644 --- a/epan/dissectors/packet-imf.c +++ b/epan/dissectors/packet-imf.c @@ -437,7 +437,6 @@ int imf_find_field_end(tvbuff_t *tvb, int offset, gint max_length, gboolean *las if(last_field) *last_field = TRUE; return offset; - break; case ' ': case '\t': /* continuation line */ @@ -445,7 +444,6 @@ int imf_find_field_end(tvbuff_t *tvb, int offset, gint max_length, gboolean *las default: /* this is a new field */ return offset; - break; } } }else { diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index dc50df6f0b..ec52e42ad3 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -523,7 +523,6 @@ dissect_ipopt_cipso(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset, /* padding - skip this tag */ offset += 1; continue; - break; case 1: /* restrictive bitmap, see CIPSO draft section 3.4.2 for tag format */ if ((taglen < 4) || (taglen > CIPSO_TAG_LEN_MAX) || diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index 140f3908d8..0fcfe6e625 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -666,7 +666,6 @@ handleHeaderDigest(iscsi_session_t *iscsi_session, proto_item *ti, tvbuff_t *tvb } } return offset + headerLen + 4; - break; } return offset + headerLen; } diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index 27a6da09b7..65dbfe1f7b 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -2296,7 +2296,6 @@ dissect_ansi_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree length, "Diagnostic: %s", tvb_bytes_to_str(parameter_tvb, offset, length)); return; - break; case 2: /*ANSI*/ proto_tree_add_item(parameter_tree, hf_isup_cause_location, parameter_tvb, offset, 1, FALSE); @@ -2318,7 +2317,6 @@ dissect_ansi_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree length, "Diagnostic: %s", tvb_bytes_to_str(parameter_tvb, offset, length)); return; - break; default: proto_tree_add_item(parameter_tree, hf_ansi_isup_coding_standard, parameter_tvb, offset, 1, FALSE); proto_tree_add_item(parameter_tree, hf_isup_extension_ind, parameter_tvb, offset, 1, FALSE); diff --git a/epan/dissectors/packet-juniper.c b/epan/dissectors/packet-juniper.c index e17f9c6c7c..5067f30406 100644 --- a/epan/dissectors/packet-juniper.c +++ b/epan/dissectors/packet-juniper.c @@ -1267,11 +1267,9 @@ ppp_heuristic_guess(guint16 proto) { case PPP_IPV6 : case PPP_IPV6CP : return TRUE; - break; default: return FALSE; /* did not find a ppp header */ - break; } } @@ -1295,7 +1293,6 @@ ip_heuristic_guess(guint8 ip_header_byte) { case 0x4e: case 0x4f: return PROTO_IP; - break; case 0x60: case 0x61: case 0x62: @@ -1313,7 +1310,6 @@ ip_heuristic_guess(guint8 ip_header_byte) { case 0x6e: case 0x6f: return PROTO_IP6; - break; default: return PROTO_UNKNOWN; /* did not find a ip header */ } diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index 60e9688ecd..60fda2535d 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -535,7 +535,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_megaco_errordescriptor(tvb, megaco_tree, tvb_len-1, tvb_command_start_offset); } return; - break; /* transactionResponseAck * transactionResponseAck = ResponseAckToken LBRKT transactionAck * *(COMMA transactionAck) RBRKT @@ -574,7 +573,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } tvb_previous_offset = tvb_LBRKT +1; return; - break; /* Pe and PN is transactionPending, P+"any char" is transactionReply */ case PENDINGTOKEN: trx_type = GCP_TRX_PENDING; @@ -604,7 +602,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_offset, len, tvb_format_text(tvb,tvb_offset,len)); return; - break; /* transactionReply */ case REPLYTOKEN: @@ -678,7 +675,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Sorry, can't understand errorDescriptor / transactionList = %s, can't parse it pos %u", tvb_format_text(tvb,tvb_previous_offset,2),tvb_previous_offset); return; - break; } /* end switch */ /* Only these remains now * transactionReply = ReplyToken EQUAL TransactionID LBRKT @@ -1086,8 +1082,6 @@ nextcontext: tvb_previous_offset, tokenlen, "No Command detectable !"); return; - - break; } } else{ diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index 84c83bb723..71b960e25c 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -1259,7 +1259,6 @@ get_encrypted_state(packet_info *pinfo, int cryptpeer) } } } - return NULL; } /* diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c index c5492ce7c5..93d4856eba 100644 --- a/epan/dissectors/packet-ppi.c +++ b/epan/dissectors/packet-ppi.c @@ -357,14 +357,12 @@ capture_ppi(const guchar *pd, int len, packet_counts *ld) case 1: /* DLT_EN10MB */ capture_eth(pd, ppi_len, len, ld); return; - break; case 105: /* DLT_DLT_IEEE802_11 */ if (is_htc) capture_ieee80211_ht(pd, ppi_len, len, ld); else capture_ieee80211(pd, ppi_len, len, ld); return; - break; default: break; } diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 1ec8a36afb..bab92b3e73 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -1457,7 +1457,6 @@ static inline int rsvp_class_to_filter_num(int classnum) case RSVP_CLASS_MESSAGE_ID_ACK : case RSVP_CLASS_MESSAGE_ID_LIST : return classnum + RSVPF_OBJECT; - break; case RSVP_CLASS_RECOVERY_LABEL : case RSVP_CLASS_UPSTREAM_LABEL : diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index 9fb4c7891d..665fa33c6d 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -1616,7 +1616,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto else g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload, key, g_strdup(transport_info->encoding_name)); - return; break; case SDP_FMTP: if(sdp_media_attribute_tree){ @@ -1667,7 +1666,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto offset = next_offset + 1; } } - return; break; case SDP_PATH: /* msrp attributes that contain address needed for conversation */ diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index 52724133dd..00395003c7 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -531,7 +531,6 @@ dissect_sflow_extended_router(tvbuff_t *tvb, proto_tree *tree, gint offset) "Unknown address type (%d)", address_type); len += 4; /* not perfect, but what else to do? */ return len; /* again, this is wrong. but... ? */ - break; }; proto_tree_add_item(tree, hf_sflow_nexthop_src_mask, tvb, offset + len, @@ -863,9 +862,8 @@ dissect_sflow(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 16; break; default: - return 0; /* unknown address. this will cause a malformed packet. */ - break; + return 0; }; if (version == 5) { diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c index 67c7063865..83f22a4d95 100644 --- a/epan/dissectors/packet-slsk.c +++ b/epan/dissectors/packet-slsk.c @@ -259,10 +259,8 @@ static gboolean check_slsk_format(tvbuff_t *tvb, int offset, const char format[] break; case '*': return TRUE; - break; default: return FALSE; - break; } if (format[1] == '\0' ) { diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c index 12cbca6eba..56b3fa411b 100644 --- a/epan/dissectors/packet-smb-pipe.c +++ b/epan/dissectors/packet-smb-pipe.c @@ -3696,7 +3696,6 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, case PIPE_LANMAN: return dissect_pipe_lanman(pd_tvb, p_tvb, d_tvb, pinfo, tree); - break; case PIPE_DCERPC: /* @@ -3721,7 +3720,6 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, case PIPE_LANMAN: return dissect_pipe_lanman(pd_tvb, p_tvb, d_tvb, pinfo, tree); - break; } break; diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 640e7987e3..93c44c805a 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -16042,22 +16042,18 @@ static const char *decode_smb_error(guint8 errcls, guint16 errcode) case SMB_SUCCESS: return("No Error"); /* No error ??? */ - break; case SMB_ERRDOS: return(val_to_str(errcode, DOS_errors, "Unknown DOS error (%x)")); - break; case SMB_ERRSRV: return(val_to_str(errcode, SRV_errors, "Unknown SRV error (%x)")); - break; case SMB_ERRHRD: return(val_to_str(errcode, HRD_errors, "Unknown HRD error (%x)")); - break; default: diff --git a/epan/ftypes/ftype-tvbuff.c b/epan/ftypes/ftype-tvbuff.c index 5df4e59378..ff9f1d835f 100644 --- a/epan/ftypes/ftype-tvbuff.c +++ b/epan/ftypes/ftype-tvbuff.c @@ -120,11 +120,9 @@ val_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFu fv->value.tvb = new_tvb; return TRUE; } - else { - /* Treat it as a string. */ - return val_from_string(fv, s, logfunc); - } - g_assert_not_reached(); + + /* Treat it as a string. */ + return val_from_string(fv, s, logfunc); } static int |