summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2012-04-30 21:15:17 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2012-04-30 21:15:17 +0000
commit1f0cbf3baa284e3dee29c849f5df91099f8f8e8f (patch)
treeed4760a9afd714f312096ee93658da443c89d934 /epan
parent26566d7cb7196face397daf8f01d5dc13473584f (diff)
downloadwireshark-1f0cbf3baa284e3dee29c849f5df91099f8f8e8f.tar.gz
Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42362
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-aim.c2
-rw-r--r--epan/dissectors/packet-ajp13.c4
-rw-r--r--epan/dissectors/packet-cops.c159
-rw-r--r--epan/dissectors/packet-db-lsp.c2
-rw-r--r--epan/dissectors/packet-dcm.c2
-rw-r--r--epan/dissectors/packet-dnp.c3
-rw-r--r--epan/dissectors/packet-dsi.c2
-rw-r--r--epan/dissectors/packet-edonkey.c20
8 files changed, 121 insertions, 73 deletions
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c
index 013bbac742..c4bfbb6d98 100644
--- a/epan/dissectors/packet-aim.c
+++ b/epan/dissectors/packet-aim.c
@@ -808,7 +808,7 @@ dissect_aim_close_conn(tvbuff_t *tvb, packet_info *pinfo, int offset,
{
col_set_str(pinfo->cinfo, COL_INFO, "Close Connection");
- offset = dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs);
+ dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs);
}
static void
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 0739031a50..4b582e3696 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -359,7 +359,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
case MTYPE_END_RESPONSE:
if (ajp13_tree)
proto_tree_add_item(ajp13_tree, hf_ajp13_reusep, tvb, pos, 1, ENC_BIG_ENDIAN);
- pos+=1;
+ /*pos+=1;*/
break;
case MTYPE_SEND_HEADERS:
@@ -456,7 +456,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
cd->content_length = rlen;
if (ajp13_tree)
proto_tree_add_item(ajp13_tree, hf_ajp13_rlen, tvb, pos, 2, ENC_BIG_ENDIAN);
- pos+=2;
+ /*pos+=2;*/
break;
}
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c
index 860e733b25..9f8530171f 100644
--- a/epan/dissectors/packet-cops.c
+++ b/epan/dissectors/packet-cops.c
@@ -1402,7 +1402,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
ti = proto_tree_add_text(tree, tvb, offset, len, "Contents:");
asn_tree = proto_item_add_subtree(ti, ett_cops_asn1);
- offset = dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb);
+ dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb);
if (oid_tvb) {
guint encoid_len = tvb_length_remaining(oid_tvb,0);
@@ -1534,7 +1534,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
ti = proto_tree_add_text(tree, tvb, offset, len, "Contents:");
asn_tree = proto_item_add_subtree(ti, ett_cops_asn1);
- offset = dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_errprid_oid, NULL);
+ dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_errprid_oid, NULL);
break;
}
@@ -3166,11 +3166,12 @@ cops_amid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Application Manager Tag */
info_to_display(tvb,stt,offset,2,"Application Manager ID Application Manager Tag", NULL,FMT_DEC,&hf_cops_pcmm_amid_am_tag);
+
}
/* Cops - Section : Multimedia Gate Specifications */
-static void
+static int
cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -3223,10 +3224,12 @@ cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Timer T4 Value */
info_to_display(tvb,stt,offset,2,"Timer T4 Value (sec)",NULL,FMT_DEC,&hf_cops_pcmm_gate_spec_timer_t4);
offset += 2;
+
+ return offset;
}
/* Cops - Section : Classifier */
-static void
+static int
cops_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean extended) {
proto_tree *stt;
@@ -3310,10 +3313,12 @@ cops_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean
/* 3 octets Not specified */
offset += 3;
+
+ return offset;
}
/* Cops - Section : IPv6 Classifier */
-static void
+static int
cops_ipv6_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -3396,10 +3401,12 @@ cops_ipv6_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* 3 octets Not specified */
offset += 3;
+
+ return offset;
}
/* Cops - Section : Gate Specifications */
-static void
+static int
cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -3452,7 +3459,7 @@ cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
info_to_display(tvb,object_tree,offset,4,"Slack Term",NULL,FMT_DEC,&hf_cops_pc_slack_term);
offset += 4;
- if (n < 64) return;
+ if (n < 64) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 28, "Reserved Envelope");
@@ -3486,7 +3493,7 @@ cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
info_to_display(tvb,object_tree,offset,4,"Slack Term",NULL,FMT_DEC,&hf_cops_pc_slack_term);
offset += 4;
- if (n < 92) return;
+ if (n < 92) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 28, "Committed Envelope");
@@ -3518,10 +3525,13 @@ cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Slack Term */
info_to_display(tvb,object_tree,offset,4,"Slack Term",NULL,FMT_DEC,&hf_cops_pc_slack_term);
+ offset += 4;
+
+ return offset;
}
/* Cops - Section : DOCSIS Service Class Name */
-static void
+static int
cops_docsis_service_class_name(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset) {
proto_tree *stt;
@@ -3543,6 +3553,8 @@ cops_docsis_service_class_name(tvbuff_t *tvb, proto_tree *st, guint object_len,
} else {
proto_tree_add_text(stt, tvb, offset - 8, 2, "Invalid object length: %u", object_len);
}
+
+ return offset;
}
/* New functions were made with the i04 suffix to maintain backward compatibility with I03
@@ -3552,7 +3564,7 @@ cops_docsis_service_class_name(tvbuff_t *tvb, proto_tree *st, guint object_len,
*/
/* Cops - Section : Best Effort Service */
-static void
+static int
cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -3617,7 +3629,7 @@ cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
offset += 4;
}
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 36 : 32, "Reserved Envelope");
@@ -3668,7 +3680,7 @@ cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
offset += 4;
}
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 36 : 32, "Committed Envelope");
@@ -3718,10 +3730,12 @@ cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Non-Real-Time Polling Service */
-static void
+static int
cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -3790,7 +3804,7 @@ cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint
offset += 4;
}
- if (n < 64) return;
+ if (n < 64) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Reserved Envelope");
@@ -3845,7 +3859,7 @@ cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint
offset += 4;
}
- if (n < 92) return;
+ if (n < 92) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Committed Envelope");
@@ -3899,10 +3913,12 @@ cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Real-Time Polling Service */
-static void
+static int
cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -3968,7 +3984,7 @@ cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
offset += 4;
}
- if (n < 64) return;
+ if (n < 64) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Reserved Envelope");
@@ -4020,7 +4036,7 @@ cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
offset += 4;
}
- if (n < 92) return;
+ if (n < 92) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Committed Envelope");
@@ -4071,10 +4087,12 @@ cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Unsolicited Grant Service */
-static void
+static int
cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4131,7 +4149,7 @@ cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
offset += 4;
}
- if (n < 40) return;
+ if (n < 40) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 28 : 24, "Reserved Envelope");
@@ -4174,7 +4192,7 @@ cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
offset += 4;
}
- if (n < 56) return;
+ if (n < 56) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 28 : 24, "Committed Envelope");
@@ -4216,10 +4234,12 @@ cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Unsolicited Grant Service with Activity Detection */
-static void
+static int
cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4284,7 +4304,7 @@ cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n,
offset += 4;
}
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 36 : 32, "Reserved Envelope");
@@ -4335,7 +4355,7 @@ cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n,
offset += 4;
}
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 36 : 32, "Committed Envelope");
@@ -4385,10 +4405,12 @@ cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n,
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Downstream Service */
-static void
+static int
cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4461,7 +4483,7 @@ cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
offset += 4;
}
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Reserved Envelope");
@@ -4520,7 +4542,7 @@ cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
offset += 4;
}
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, i05 ? 40 : 36, "Committed Envelope");
@@ -4578,10 +4600,12 @@ cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32
info_to_display(tvb,object_tree,offset,4,"Attribute Aggregation Rule Mask",NULL,FMT_DEC,&hf_cops_pcmm_att_aggr_rule_mask);
offset += 4;
}
+
+ return offset;
}
/* Cops - Section : Upstream Drop */
-static void
+static int
cops_upstream_drop_i04(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -4595,12 +4619,14 @@ cops_upstream_drop_i04(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree_add_text(stt, tvb, offset, 3, "Reserved");
offset += 3;
+
+ return offset;
}
/* END PCMM I04 */
/* Cops - Section : Best Effort Service */
-static void
+static int
cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4651,7 +4677,7 @@ cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
info_to_display(tvb,object_tree,offset,2,"Reserved",NULL,FMT_HEX,&hf_cops_pc_reserved);
offset += 2;
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Reserved Envelope");
@@ -4688,7 +4714,7 @@ cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
info_to_display(tvb,object_tree,offset,2,"Reserved",NULL,FMT_HEX,&hf_cops_pc_reserved);
offset += 2;
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Committed Envelope");
@@ -4724,10 +4750,12 @@ cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
/* Reserved */
info_to_display(tvb,object_tree,offset,2,"Reserved",NULL,FMT_HEX,&hf_cops_pc_reserved);
offset += 2;
+
+ return offset;
}
/* Cops - Section : Non-Real-Time Polling Service */
-static void
+static int
cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4782,7 +4810,7 @@ cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint
info_to_display(tvb,object_tree,offset,4,"Nominal Polling Interval",NULL,FMT_DEC,&hf_cops_pcmm_nominal_polling_interval);
offset += 4;
- if (n < 64) return;
+ if (n < 64) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Reserved Envelope");
@@ -4823,7 +4851,7 @@ cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint
info_to_display(tvb,object_tree,offset,4,"Nominal Polling Interval",NULL,FMT_DEC,&hf_cops_pcmm_nominal_polling_interval);
offset += 4;
- if (n < 92) return;
+ if (n < 92) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Committed Envelope");
@@ -4863,10 +4891,12 @@ cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint
/* Nominal Polling Interval */
info_to_display(tvb,object_tree,offset,4,"Nominal Polling Interval",NULL,FMT_DEC,&hf_cops_pcmm_nominal_polling_interval);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Real-Time Polling Service */
-static void
+static int
cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -4918,7 +4948,7 @@ cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
- if (n < 64) return;
+ if (n < 64) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Reserved Envelope");
@@ -4956,7 +4986,7 @@ cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
- if (n < 92) return;
+ if (n < 92) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Committed Envelope");
@@ -4993,10 +5023,12 @@ cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
/* Tolerated Poll Jitter */
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Unsolicited Grant Service */
-static void
+static int
cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -5039,7 +5071,7 @@ cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
info_to_display(tvb,object_tree,offset,4,"Tolerated Grant Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_grant_jitter);
offset += 4;
- if (n < 40) return;
+ if (n < 40) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 16, "Reserved Envelope");
@@ -5068,7 +5100,7 @@ cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
info_to_display(tvb,object_tree,offset,4,"Tolerated Grant Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_grant_jitter);
offset += 4;
- if (n < 56) return;
+ if (n < 56) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 16, "Committed Envelope");
@@ -5096,10 +5128,12 @@ cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o
/* Tolerated Grant Jitter */
info_to_display(tvb,object_tree,offset,4,"Tolerated Grant Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_grant_jitter);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Unsolicited Grant Service with Activity Detection */
-static void
+static int
cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -5150,7 +5184,7 @@ cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Reserved Envelope");
@@ -5187,7 +5221,7 @@ cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Committed Envelope");
@@ -5223,10 +5257,12 @@ cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32
/* Tolerated Poll Jitter */
info_to_display(tvb,object_tree,offset,4,"Tolerated Poll Jitter",NULL,FMT_DEC,&hf_cops_pcmm_tolerated_poll_jitter);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Downstream Service */
-static void
+static int
cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_item *ti;
proto_tree *stt, *object_tree;
@@ -5277,7 +5313,7 @@ cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
info_to_display(tvb,object_tree,offset,4,"Maximum Downstream Latency",NULL,FMT_DEC,&hf_cops_pcmm_max_downstream_latency);
offset += 4;
- if (n < 56) return;
+ if (n < 56) return offset;
/* Reserved Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Reserved Envelope");
@@ -5314,7 +5350,7 @@ cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
info_to_display(tvb,object_tree,offset,4,"Maximum Downstream Latency",NULL,FMT_DEC,&hf_cops_pcmm_max_downstream_latency);
offset += 4;
- if (n < 80) return;
+ if (n < 80) return offset;
/* Committed Envelope */
ti = proto_tree_add_text(stt, tvb, offset, 24, "Committed Envelope");
@@ -5350,6 +5386,8 @@ cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset)
/* Maximum Downstream Latency */
info_to_display(tvb,object_tree,offset,4,"Maximum Downstream Latency",NULL,FMT_DEC,&hf_cops_pcmm_max_downstream_latency);
offset += 4;
+
+ return offset;
}
/* Cops - Section : PacketCable Multimedia Event Gereration-Info */
@@ -5406,7 +5444,7 @@ cops_mm_event_generation_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 of
}
/* Cops - Section : Volume-Based Usage Limit */
-static void
+static int
cops_volume_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset) {
proto_tree *stt;
@@ -5418,10 +5456,13 @@ cops_volume_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint object_len, g
/* Usage Limit */
proto_tree_add_item(stt, hf_cops_pcmm_volume_based_usage_limit, tvb, offset, 8,
ENC_BIG_ENDIAN);
+ offset += 8;
+
+ return offset;
}
/* Cops - Section : Time-Based Usage Limit */
-static void
+static int
cops_time_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5433,6 +5474,8 @@ cops_time_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offs
/* Time Limit */
info_to_display(tvb,stt,offset,4,"Time Limit", NULL,FMT_DEC,&hf_cops_pcmm_time_based_usage_limit);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Opaque Data */
@@ -5450,7 +5493,7 @@ cops_opaque_data(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset
}
/* Cops - Section : Gate Time Info */
-static void
+static int
cops_gate_time_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5462,6 +5505,8 @@ cops_gate_time_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Gate Time Info */
info_to_display(tvb,stt,offset,4,"Time Committed", NULL,FMT_DEC,&hf_cops_pcmm_gate_time_info);
offset += 4;
+
+ return offset;
}
/* Cops - Section : Gate Usage Info */
@@ -5479,7 +5524,7 @@ cops_gate_usage_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
}
/* Cops - Section : PacketCable error */
-static void
+static int
cops_packetcable_mm_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5504,10 +5549,12 @@ cops_packetcable_mm_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset
proto_tree_add_uint_format(stt, hf_cops_pcmm_packetcable_error_subcode,
tvb, offset, 2, code, "Error-Subcode: 0x%04x", subcode);
offset += 2;
+
+ return offset;
}
/* Cops - Section : Gate State */
-static void
+static int
cops_gate_state(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5523,10 +5570,12 @@ cops_gate_state(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Reason */
info_to_display(tvb,stt,offset,2,"Reason",pcmm_gate_state_reason,FMT_DEC,&hf_cops_pcmm_packetcable_gate_state_reason);
offset += 2;
+
+ return offset;
}
/* Cops - Section : Version Info */
-static void
+static int
cops_version_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5542,6 +5591,8 @@ cops_version_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Reason */
info_to_display(tvb,stt,offset,2,"Minor Version Number",NULL,FMT_DEC,&hf_cops_pcmm_packetcable_version_info_minor);
offset += 2;
+
+ return offset;
}
/* Cops - Section : PSID */
@@ -5559,7 +5610,7 @@ cops_psid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
}
/* Cops - Section : Synch Options */
-static void
+static int
cops_synch_options(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
proto_tree *stt;
@@ -5578,6 +5629,8 @@ cops_synch_options(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
/* Sych Type */
info_to_display(tvb,stt,offset,1,"Synch Type", pcmm_synch_type_vals,FMT_DEC,&hf_cops_pcmm_synch_options_synch_type);
offset += 1;
+
+ return offset;
}
/* Cops - Section : Msg Receipt Key */
diff --git a/epan/dissectors/packet-db-lsp.c b/epan/dissectors/packet-db-lsp.c
index 6ce601802c..f167f972bb 100644
--- a/epan/dissectors/packet-db-lsp.c
+++ b/epan/dissectors/packet-db-lsp.c
@@ -134,7 +134,7 @@ dissect_db_lsp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
proto_tree_add_item (db_lsp_tree, hf_value, tvb, offset, length, ENC_NA);
}
- offset += length;
+ /*offset += length;*/
proto_item_append_text (db_lsp_item, ", Type: %d, Length: %d", type, length);
proto_item_set_len (db_lsp_item, length + 5);
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index fe4da5da20..f330e714ba 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -5813,7 +5813,6 @@ dissect_dcm_tag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (len_decoded_remaing >= 2) {
vl_2 = pdv->prev->open_tag.vl_2;
- len_decoded_remaing -= 2;
}
else {
@@ -6131,7 +6130,6 @@ dissect_dcm_pdv_body(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_bytes_format(tree, hf_dcm_data_tag, tvb,
offset, pdv_body_len, NULL,
"(%04x,%04x) %-8x Unparsed data", 0, 0, pdv_body_len);
- offset = endpos;
}
else {
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c
index 1cb80a2387..2a2e538e31 100644
--- a/epan/dissectors/packet-dnp.c
+++ b/epan/dissectors/packet-dnp.c
@@ -1236,7 +1236,7 @@ dnp3_al_process_iin(tvbuff_t *tvb, int offset, proto_tree *al_tree)
if (al_iin & AL_IIN_EBO) comma_needed = add_item_text(tiin, "Event Buffer Overflow", comma_needed);
if (al_iin & AL_IIN_PIOOR) comma_needed = add_item_text(tiin, "Parameters Invalid or Out of Range", comma_needed);
if (al_iin & AL_IIN_OBJU) comma_needed = add_item_text(tiin, "Requested Objects Unknown", comma_needed);
- if (al_iin & AL_IIN_FCNI) comma_needed = add_item_text(tiin, "Function code not implemented", comma_needed);
+ if (al_iin & AL_IIN_FCNI) /*comma_needed = */add_item_text(tiin, "Function code not implemented", comma_needed);
proto_item_append_text(tiin, " (0x%04x)", al_iin);
iin_tree = proto_item_add_subtree(tiin, ett_dnp3_al_iin);
@@ -2916,7 +2916,6 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(al_tree, tvb, offset - (chk_size + 2), chk_size + 2,
"Application Chunk %u Len: %u Bad CRC got 0x%04x expected 0x%04x",
i, chk_size, act_crc, calc_crc);
- data_len = 0;
break;
}
i++;
diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c
index 5766ed99f6..17e10bbacf 100644
--- a/epan/dissectors/packet-dsi.c
+++ b/epan/dissectors/packet-dsi.c
@@ -497,7 +497,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
ofs += ulen;
}
- return offset;
+ return ofs;
}
static void
diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c
index d1b3bab466..8494427d8d 100644
--- a/epan/dissectors/packet-edonkey.c
+++ b/epan/dissectors/packet-edonkey.c
@@ -1940,7 +1940,7 @@ static void dissect_emule_tcp_message(guint8 msg_type,
case EMULE_MSG_HELLO_ANSWER: /* eMule Info Answer: <eMule Version> <Meta tag list> */
version = tvb_get_letohs(tvb, offset);
proto_tree_add_text(tree, tvb, offset, 2, "Version: %u", version);
- offset = dissect_edonkey_metatag_list(tvb, pinfo, offset+2, tree);
+ dissect_edonkey_metatag_list(tvb, pinfo, offset+2, tree);
break;
case EMULE_MSG_QUEUE_RANKING: /* eMule Queue Ranking: <eMule Rank (guint16)> */
@@ -1949,12 +1949,12 @@ static void dissect_emule_tcp_message(guint8 msg_type,
break;
case EMULE_MSG_SOURCES_REQUEST: /* Sources Request: <File Hash> */
- offset = dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
+ dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
break;
case EMULE_MSG_SOURCES_ANSWER: /* Sources Answer: <File Hash> <Address List> */
offset = dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
- offset = dissect_emule_address_list(tvb, pinfo, offset, tree);
+ dissect_emule_address_list(tvb, pinfo, offset, tree);
break;
case EMULE_MSG_SEC_IDENT_STATE: {
@@ -1964,13 +1964,12 @@ static void dissect_emule_tcp_message(guint8 msg_type,
offset++;
rndchallenge = tvb_get_letohl(tvb, offset);
proto_tree_add_text(tree, tvb, offset, 4, "Rndchallenge: %u", rndchallenge);
- offset += 4;
break;
}
case EMULE_MSG_PUBLIC_KEY: /* Public Key: <1byte : len> <len bytes: pubkey> */
- offset = dissect_edonkey_public_key(tvb, pinfo, offset, tree);
+ /* offset =*/ dissect_edonkey_public_key(tvb, pinfo, offset, tree);
/* offset = dissect_emule_publickey(tvb, pinfo, offset, tree); */
break;
@@ -1979,7 +1978,6 @@ static void dissect_emule_tcp_message(guint8 msg_type,
if (msg_end != offset) {
guint8 sigIPused = tvb_get_guint8(tvb, offset);
proto_tree_add_text(tree, tvb, offset, 1, "Sig IP Used: %u", sigIPused);
- offset++;
}
break;
@@ -2026,7 +2024,7 @@ static void dissect_emule_tcp_message(guint8 msg_type,
offset = dissect_edonkey_start_offset_64(tvb, pinfo, offset, tree);
offset = dissect_edonkey_end_offset_64(tvb, pinfo, offset, tree);
offset = dissect_edonkey_end_offset_64(tvb, pinfo, offset, tree);
- offset = dissect_edonkey_end_offset_64(tvb, pinfo, offset, tree);
+ dissect_edonkey_end_offset_64(tvb, pinfo, offset, tree);
break;
case EMULE_MSG_SENDING_PART_64: /* Sending Part: <File hash> <Start offset> <End offset> DATA */
@@ -2041,7 +2039,7 @@ static void dissect_emule_tcp_message(guint8 msg_type,
case EMULE_MSG_CALLBACK: /* Callback: < hash ><hash> <uint16> */
offset = dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
- offset = dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
+ /*offset = */dissect_edonkey_file_hash(tvb, pinfo, offset, tree);
/* offset = dissect_edonkey_generic_uint16(tvb, pinfo, offset, tree, "uint16" ); */
break;
@@ -2050,7 +2048,7 @@ static void dissect_emule_tcp_message(guint8 msg_type,
partnum = tvb_get_letohs(tvb, offset);
proto_tree_add_uint(tree, hf_emule_aich_partnum, tvb, offset, 2, partnum);
offset += 2;
- offset = dissect_emule_aich_root_hash(tvb, pinfo, offset, tree);
+ dissect_emule_aich_root_hash(tvb, pinfo, offset, tree);
break;
case EMULE_MSG_AICH_ANSWER: /* AICH Answer: <File Hash> <PartNum> <AICH Hash> <AICH Hash List> */
@@ -2059,13 +2057,13 @@ static void dissect_emule_tcp_message(guint8 msg_type,
proto_tree_add_uint(tree, hf_emule_aich_partnum, tvb, offset, 2, partnum);
offset += 2;
offset = dissect_emule_aich_root_hash(tvb, pinfo, offset, tree);
- offset = dissect_emule_aich_hash_list(tvb, pinfo, offset, tree);
+ dissect_emule_aich_hash_list(tvb, pinfo, offset, tree);
break;
case EMULE_MSG_MULTIPACKET: /* MultiPacket: <Hash> <Opcodes> */
case EMULE_MSG_MULTIPACKET_ANSWER:
case EMULE_MSG_MULTIPACKET_EXT: /* MultiPacketExt: <Hash> <FileLength> <Opcodes> */
- offset = dissect_emule_multipacket(tvb, pinfo, offset, offset+length, tree, msg_type==EMULE_MSG_MULTIPACKET_EXT);
+ dissect_emule_multipacket(tvb, pinfo, offset, offset+length, tree, msg_type==EMULE_MSG_MULTIPACKET_EXT);
break;
default: