diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-07-03 16:43:40 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-07-03 16:43:40 +0000 |
commit | a06cccbe25464649ee681bf7725ac841cedb122c (patch) | |
tree | 927968a08c23ee3bf76fc2db86ebd9ee1c3824e2 /epan/dissectors/packet-cfm.c | |
parent | d58b0bf1a1e7f6f1870c8b76b94ca01ae4a133a4 (diff) |
Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50352
Diffstat (limited to 'epan/dissectors/packet-cfm.c')
-rw-r--r-- | epan/dissectors/packet-cfm.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/epan/dissectors/packet-cfm.c b/epan/dissectors/packet-cfm.c index 00f6c02a12..d0162d2d89 100644 --- a/epan/dissectors/packet-cfm.c +++ b/epan/dissectors/packet-cfm.c @@ -433,7 +433,6 @@ static gint ett_cfm_raps_flags = -1; static int dissect_cfm_ccm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset) { gint maid_offset; - gint itu_offset; guint8 cfm_maid_md_name_format; guint8 cfm_maid_ma_name_format; @@ -527,17 +526,15 @@ static int dissect_cfm_ccm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr /* Dissect 16 octets reserved for Y.1731, samples of the wrap-around frame counters */ wi = proto_tree_add_item(cfm_pdu_tree, hf_cfm_ccm_itu_t_y1731, tvb, offset, 16, ENC_NA); cfm_ccm_itu_tree = proto_item_add_subtree(wi, ett_cfm_ccm_itu); - itu_offset = offset; - proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_TxFCf, tvb, itu_offset, 4, ENC_NA); - itu_offset += 4; - proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_RxFCb, tvb, itu_offset, 4, ENC_NA); - itu_offset += 4; - proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_TxFCb, tvb, itu_offset, 4, ENC_NA); - itu_offset += 4; - proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_reserved, tvb, itu_offset, 4, ENC_NA); - itu_offset += 4; - - offset += 16; + proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_TxFCf, tvb, offset, 4, ENC_NA); + offset += 4; + proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_RxFCb, tvb, offset, 4, ENC_NA); + offset += 4; + proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_TxFCb, tvb, offset, 4, ENC_NA); + offset += 4; + proto_tree_add_item(cfm_ccm_itu_tree, hf_cfm_itu_reserved, tvb, offset, 4, ENC_NA); + offset += 4; + return offset; } @@ -1517,7 +1514,7 @@ static void dissect_cfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } - cfm_tlv_offset += cfm_tlv_length; + cfm_tlv_offset += tlv_data_offset; } } } |