From ed69bf3bc7fdbc679f7a331efabcb712823ceb14 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 10 Jul 2016 10:23:40 -0700 Subject: Remove a compiler warning some platforms give. Some UN*Xes declare an index() function, that being the name strchr() originally had in V7 UNIX. This causes warnings from compilers if you have a variable named "index", so rename the variable. Change-Id: Ibb046005d1ef911ce0739ce70a0a55c13310cdf0 Reviewed-on: https://code.wireshark.org/review/16372 Reviewed-by: Guy Harris --- plugins/docsis/packet-dpd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/docsis/packet-dpd.c b/plugins/docsis/packet-dpd.c index 3249b1aa77..b06618ab9a 100644 --- a/plugins/docsis/packet-dpd.c +++ b/plugins/docsis/packet-dpd.c @@ -184,7 +184,7 @@ dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb, proto_tree * tree, guin proto_item *it; proto_tree *subcarrier_assignment_vector_tree; guint8 subcarrier_assignment_vector_oddness; - gint32 index; + gint32 vector_index; it = proto_tree_add_protocol_format (tree, proto_docsis_dpd, tvb, start-3, len+3, ".6 Subcarrier Assignment Vector"); subcarrier_assignment_vector_tree = proto_item_add_subtree (it, ett_docsis_dpd_tlv_subcarrier_assignment_vector); @@ -196,12 +196,12 @@ dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb, proto_tree * tree, guin subcarrier_assignment_vector_oddness = (tvb_get_guint8(tvb, start) >> 7); - for(index = 0; index < len; ++index) + for(vector_index = 0; vector_index < len; ++vector_index) { - proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd, tvb, start + 2 + index, 1, ENC_BIG_ENDIAN); - if (!((index == len -1) && subcarrier_assignment_vector_oddness)) + proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN); + if (!((vector_index == len -1) && subcarrier_assignment_vector_oddness)) { - proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_even, tvb, start + 2 + index, 1, ENC_BIG_ENDIAN); + proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_even, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN); } } } -- cgit v1.2.3