aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-02-07 23:50:59 +0000
committerAnders Broman <a.broman58@gmail.com>2016-02-08 05:54:49 +0000
commit0fbc8f80dae3fa7f47d121b25655ac86268681b8 (patch)
tree5fe92d4c565172b4e6a87f251238ffe3625c2246 /epan
parentb82e1e0e9e14c12043f12cf7465febb94612433e (diff)
TCAP: Fix warning [-Wclobbered]
Add TCAP to clean ASN.1 dissector list. Change-Id: I256dabe0961b681d22c230378f19968d9f7eda26 Reviewed-on: https://code.wireshark.org/review/13812 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/CMakeLists.txt2
-rw-r--r--epan/dissectors/Makefile.common2
-rw-r--r--epan/dissectors/packet-tcap.c25
3 files changed, 15 insertions, 14 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index c21f6ba226..7899fd9c1d 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -285,6 +285,7 @@ set(ASN1_DISSECTOR_SRC
dissectors/packet-t124.c
dissectors/packet-t125.c
dissectors/packet-t38.c
+ dissectors/packet-tcap.c
dissectors/packet-tetra.c
dissectors/packet-ulp.c
dissectors/packet-wlancertextn.c
@@ -296,7 +297,6 @@ set(ASN1_DISSECTOR_SRC
)
set(DIRTY_ASN1_DISSECTOR_SRC
- dissectors/packet-tcap.c
)
set(DIRTY_CORBA_IDL_DISSECTOR_SRC
diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common
index 3f1211d114..52edbf8753 100644
--- a/epan/dissectors/Makefile.common
+++ b/epan/dissectors/Makefile.common
@@ -193,6 +193,7 @@ ASN1_DISSECTOR_SRC = \
packet-t124.c \
packet-t125.c \
packet-t38.c \
+ packet-tcap.c \
packet-tetra.c \
packet-ulp.c \
packet-wlancertextn.c \
@@ -211,7 +212,6 @@ CORBA_IDL_DISSECTOR_SRC =
# asn2wrs-generated ASN.1 dissectors with warnings.
#
DIRTY_ASN1_DISSECTOR_SRC = \
- packet-tcap.c \
$(CUSTOM_DIRTY_ASN1_DISSECTOR_SRC)
#
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index 737e3aac56..751bf027eb 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -670,6 +670,7 @@ dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
gboolean pc;
gint tag;
guint32 len, comp_offset;
+ volatile guint32 _offset;
gint ind_field;
comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
@@ -680,16 +681,17 @@ dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
if (!next_tvb)
return comp_offset;
+ _offset = offset;
TRY {
- offset = dissect_ber_choice(actx, tree, tvb, offset,
+ _offset = dissect_ber_choice(actx, tree, tvb, _offset,
Component_choice, hf_index, ett_tcap_Component,
NULL);
-
}
CATCH_NONFATAL_ERRORS {
show_exception(tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
}
ENDTRY;
+ offset = _offset;
dissect_tcap_ITU_ComponentPDU(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index);
@@ -752,7 +754,7 @@ dissect_tcap_OCTET_STRING_SIZE_1_4(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_tcap_OrigTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 126 "../../asn1/tcap/tcap.cnf"
+#line 131 "../../asn1/tcap/tcap.cnf"
tvbuff_t *parameter_tvb;
guint8 len, i;
proto_tree *subtree;
@@ -811,7 +813,7 @@ static const ber_sequence_t Begin_sequence[] = {
static int
dissect_tcap_Begin(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 211 "../../asn1/tcap/tcap.cnf"
+#line 215 "../../asn1/tcap/tcap.cnf"
gp_tcapsrt_info->ope=TC_BEGIN;
/* Do not change col_add_str() to col_append_str() here: we _want_ this call
@@ -833,7 +835,7 @@ gp_tcapsrt_info->ope=TC_BEGIN;
static int
dissect_tcap_DestTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 169 "../../asn1/tcap/tcap.cnf"
+#line 174 "../../asn1/tcap/tcap.cnf"
tvbuff_t *parameter_tvb;
guint8 len , i;
proto_tree *subtree;
@@ -878,7 +880,6 @@ dissect_tcap_DestTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
}
-
return offset;
}
@@ -892,7 +893,7 @@ static const ber_sequence_t End_sequence[] = {
static int
dissect_tcap_End(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 225 "../../asn1/tcap/tcap.cnf"
+#line 229 "../../asn1/tcap/tcap.cnf"
gp_tcapsrt_info->ope=TC_END;
col_set_str(actx->pinfo->cinfo, COL_INFO, "End ");
@@ -914,7 +915,7 @@ static const ber_sequence_t Continue_sequence[] = {
static int
dissect_tcap_Continue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 232 "../../asn1/tcap/tcap.cnf"
+#line 236 "../../asn1/tcap/tcap.cnf"
gp_tcapsrt_info->ope=TC_CONT;
col_set_str(actx->pinfo->cinfo, COL_INFO, "Continue ");
@@ -985,7 +986,7 @@ static const ber_sequence_t Abort_sequence[] = {
static int
dissect_tcap_Abort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 239 "../../asn1/tcap/tcap.cnf"
+#line 243 "../../asn1/tcap/tcap.cnf"
gp_tcapsrt_info->ope=TC_ABORT;
col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
@@ -1034,7 +1035,7 @@ dissect_tcap_AUDT_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_tcap_AUDT_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 111 "../../asn1/tcap/tcap.cnf"
+#line 116 "../../asn1/tcap/tcap.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid);
tcap_private.oid= (const void*) cur_oid;
@@ -1131,7 +1132,7 @@ dissect_tcap_AARQ_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_tcap_AARQ_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 116 "../../asn1/tcap/tcap.cnf"
+#line 121 "../../asn1/tcap/tcap.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid);
tcap_private.oid= (const void*) cur_oid;
@@ -1199,7 +1200,7 @@ dissect_tcap_AARE_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_tcap_AARE_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 121 "../../asn1/tcap/tcap.cnf"
+#line 126 "../../asn1/tcap/tcap.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid);
tcap_private.oid= (const void*) cur_oid;