diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-06-06 13:34:47 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-06-06 16:14:26 +0000 |
commit | dd52b1653791a7e4367d134f740b724155063db6 (patch) | |
tree | c07ef2008b43425a330bc37d2cfa520578e1dfb1 /epan/dissectors/packet-epl.c | |
parent | a5a4a0bd55769ad63fa568897b0da504aab9a6c2 (diff) | |
download | wireshark-dd52b1653791a7e4367d134f740b724155063db6.tar.gz |
epl: fix code will never be executed [-Wunreachable-code]
false positive when declare variable after a switch(){
Change-Id: Ief4770b2200a356b061cf84c7828c8ebe76a1fbb
Reviewed-on: https://code.wireshark.org/review/21983
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-epl.c')
-rw-r--r-- | epan/dissectors/packet-epl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 65a2083bdb..2d8dc2fc95 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -2477,6 +2477,7 @@ dissect_eplpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean udp proto_tree *epl_tree = NULL, *epl_src_item, *epl_dest_item; gint offset = 0, size = 0; heur_dtbl_entry_t *hdtbl_entry; + struct epl_convo *convo; if (tvb_reported_length(tvb) < 3) { @@ -2603,7 +2604,6 @@ dissect_eplpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean udp /* The rest of the EPL dissector depends on the message type */ switch (epl_mtyp) { - struct epl_convo *convo; case EPL_SOC: offset = dissect_epl_soc(epl_tree, tvb, pinfo, offset); break; @@ -3017,6 +3017,7 @@ dissect_epl_asnd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint o tvbuff_t *next_tvb; proto_item *item; proto_tree *subtree; + struct epl_convo *convo; /* get ServiceID of payload */ svid = tvb_get_guint8(tvb, offset); @@ -3029,7 +3030,6 @@ dissect_epl_asnd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint o switch (svid) { - struct epl_convo *convo; case EPL_ASND_IDENTRESPONSE: convo = epl_get_convo(pinfo, CONVO_FOR_RESPONSE); offset = dissect_epl_asnd_ires(convo, epl_tree, tvb, pinfo, offset); @@ -3077,6 +3077,7 @@ dissect_epl_ainv(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint o guint8 svid; proto_item *item; proto_tree *subtree; + struct epl_convo *convo; if (pinfo->srcport != EPL_MN_NODEID) /* check if CN or MN */ { @@ -3102,7 +3103,6 @@ dissect_epl_ainv(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint o switch (svid) { - struct epl_convo *convo; case EPL_ASND_IDENTRESPONSE: convo = epl_get_convo(pinfo, CONVO_FOR_RESPONSE); offset = dissect_epl_asnd_ires(convo, epl_tree, tvb, pinfo, offset); |