summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-09-04 12:43:35 +0200
committerMichael Mann <mmann78@netscape.net>2015-09-07 14:23:06 +0000
commit8491be3a9e0f5d14de77e3faddba9b022f6379c4 (patch)
tree8ad8fa6902e740a3a5ebe13a964a259cdd9ebe2a
parent84a3c85be4b7272b07b0da7cea741dd54e1a11b5 (diff)
downloadwireshark-8491be3a9e0f5d14de77e3faddba9b022f6379c4.tar.gz
WIMAX (msg_ucd): fix will never be executed [-Wunreachable-code]
Move declaration for avoid https://llvm.org/bugs/show_bug.cgi?id=19020 Found by Clang 3.7 Change-Id: Ibb14b00d7af2cb0d24eb153d40640a2f9ee4f887 Reviewed-on: https://code.wireshark.org/review/10379 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--plugins/wimax/msg_ucd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/wimax/msg_ucd.c b/plugins/wimax/msg_ucd.c
index 5a73fe8b23..4dc20fe475 100644
--- a/plugins/wimax/msg_ucd.c
+++ b/plugins/wimax/msg_ucd.c
@@ -265,6 +265,10 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
while(offset < tvb_len)
{
+ proto_tree *tlv_tree;
+ proto_item *tlv_item1;
+ guint ul_burst_uiuc;
+ guint utemp;
/* get the TLV information */
init_tlv_info(&tlv_info, tvb, offset);
/* get the TLV type */
@@ -333,11 +337,6 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
}
switch (tlv_type)
{
- proto_tree *tlv_tree;
- proto_item *tlv_item1;
- guint ul_burst_uiuc;
- guint utemp;
-
case UCD_UPLINK_BURST_PROFILE:
{
/* get the UIUC */
@@ -363,7 +362,6 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
switch (tlv_type)
{
- proto_item *tlv_item2;
case UCD_BURST_FEC:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_fec, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
@@ -371,6 +369,7 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
}
case UCD_BURST_RANGING_DATA_RATIO:
{
+ proto_item *tlv_item2;
tlv_item2 = add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_ranging_data_ratio, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
proto_item_append_text(tlv_item2, " dB");
break;
@@ -378,6 +377,7 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
#if 0 /* for OFDM */
case UCD_BURST_POWER_BOOST:
{
+ proto_item *tlv_item2;
tlv_item2 = add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_power_boost, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
proto_item_append_text(tlv_item2, " dB");
break;