diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-03-02 20:17:36 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-03-02 20:17:36 +0000 |
commit | 9bd03126614e52c0ee110d20e34444d0ab3c59fb (patch) | |
tree | 8850bd2d36338a3518a42be7caf981816ada7cac /epan/dissectors/packet-ieee17221.c | |
parent | 464ec2dcb129d764b2fb5cebb6f0f9b5d91342e4 (diff) |
Fix a few bugs found by Clang analysis:
packet-ieee17221.c:3123:10: warning: Value stored to 'mr_offset' is never read
- Put the offset increment inside the loop
packet-ieee17221.c:2888:10: warning: Value stored to 'mr_subtree' is never read
- Use the newly-created subtree (instead of the parent tree)
packet-ieee17221.c:2692:13: warning: Value stored to 'next_tvb' is never read
- Use next_tvb (instead of the main tvb which doesn't start at the
correct offset)
svn path=/trunk/; revision=41324
Diffstat (limited to 'epan/dissectors/packet-ieee17221.c')
-rw-r--r-- | epan/dissectors/packet-ieee17221.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ieee17221.c b/epan/dissectors/packet-ieee17221.c index d60fabf7ea..8025826911 100644 --- a/epan/dissectors/packet-ieee17221.c +++ b/epan/dissectors/packet-ieee17221.c @@ -2690,7 +2690,7 @@ dissect_17221_aem(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) for(i = 0; i < mr_counter; ++i) { next_tvb = tvb_new_subset(tvb, mr_offset, 8, 8); - dissect_17221_stream_format(tvb, mr_subtree); + dissect_17221_stream_format(next_tvb, mr_subtree); mr_offset += 8; } break; @@ -2888,13 +2888,13 @@ dissect_17221_aem(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) mr_subtree = proto_item_add_subtree(mr_item, ett_aem_clock_source_flags); /* all flags reserved */ /* end clock_source_flags subtree */ - proto_tree_add_item(aem_tree, hf_aem_clock_source_type, tvb, + proto_tree_add_item(mr_subtree, hf_aem_clock_source_type, tvb, AEM_OFFSET_CLOCK_SOURCE_TYPE, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(aem_tree, hf_aecp_clock_source_id, tvb, + proto_tree_add_item(mr_subtree, hf_aecp_clock_source_id, tvb, AEM_OFFSET_CLOCK_SOURCE_ID_CLK, 8, ENC_BIG_ENDIAN); - proto_tree_add_item(aem_tree, hf_aem_clock_source_location_type, tvb, + proto_tree_add_item(mr_subtree, hf_aem_clock_source_location_type, tvb, AEM_OFFSET_CLOCK_SOURCE_LOCATION_TYPE, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(aem_tree, hf_aem_clock_source_location_id, tvb, + proto_tree_add_item(mr_subtree, hf_aem_clock_source_location_id, tvb, AEM_OFFSET_CLOCK_SOURCE_LOCATION_ID, 2, ENC_BIG_ENDIAN); break; case AEM_DESCRIPTOR_AUDIO_MAP: @@ -3119,8 +3119,8 @@ dissect_17221_aem(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) for(i = 0; i < 7; ++i) { proto_tree_add_item(aem_tree, hf_aem_string, tvb, mr_offset, 64, ENC_ASCII|ENC_NA); + mr_offset += 64; } - mr_offset += 64; break; case AEM_DESCRIPTOR_MATRIX_SIGNAL: proto_tree_add_item(aem_tree, hf_aem_signals_count, tvb, |