diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-02-07 23:50:59 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-02-08 05:54:49 +0000 |
commit | 0fbc8f80dae3fa7f47d121b25655ac86268681b8 (patch) | |
tree | 5fe92d4c565172b4e6a87f251238ffe3625c2246 /epan/dissectors/packet-tcap.c | |
parent | b82e1e0e9e14c12043f12cf7465febb94612433e (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/dissectors/packet-tcap.c')
-rw-r--r-- | epan/dissectors/packet-tcap.c | 25 |
1 files changed, 13 insertions, 12 deletions
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; |