From fa7ea2ea34cd9cfae562ae28fef7b02b6862b7fd Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Sat, 12 Nov 2011 12:37:38 +0000 Subject: fix [-Wunused-but-set-variable] svn path=/trunk/; revision=39803 --- asn1/h248/packet-h248-template.c | 17 +++-------------- asn1/smrse/packet-smrse-template.c | 2 -- asn1/spnego/packet-spnego-template.c | 4 ++++ 3 files changed, 7 insertions(+), 16 deletions(-) (limited to 'asn1') diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 5fbc01e6c1..d9390b3c47 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -745,14 +745,12 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi tvbuff_t *new_tvb = NULL; proto_tree *package_tree=NULL; guint16 name_major, name_minor; - int old_offset; const h248_package_t* pkg = NULL; guint i; int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - old_offset=offset; offset = dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hfid , &new_tvb); if (new_tvb) { @@ -899,11 +897,9 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse tvbuff_t *new_tvb = NULL; proto_tree *package_tree=NULL; guint16 name_major, name_minor; - int old_offset; const h248_package_t* pkg = NULL; guint i; - old_offset=offset; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb); if (new_tvb) { @@ -959,12 +955,10 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs tvbuff_t *new_tvb; proto_tree *package_tree=NULL; guint16 name_major, name_minor; - int old_offset; const h248_package_t* pkg = NULL; const h248_pkg_evt_t* evt = NULL; guint i; - old_offset=offset; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb); if (new_tvb) { @@ -1038,12 +1032,10 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of tvbuff_t *new_tvb; proto_tree *package_tree=NULL; guint16 name_major, name_minor; - int old_offset; const h248_package_t* pkg = NULL; const h248_pkg_sig_t* sig; guint i; - old_offset=offset; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb); if (new_tvb) { @@ -1118,12 +1110,11 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int guint32 len; guint16 name_major; guint16 name_minor; - int old_offset, end_offset; + int end_offset; tvbuff_t *next_tvb; const h248_package_t* pkg; const h248_pkg_param_t* prop; - old_offset=offset; offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); end_offset=offset+len; @@ -1202,13 +1193,12 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) { tvbuff_t *next_tvb; - int old_offset, end_offset; + int end_offset; gint8 class; gboolean pc, ind; gint32 tag; guint32 len; - old_offset=offset; offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); end_offset=offset+len; @@ -1277,13 +1267,12 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t * static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) { tvbuff_t *next_tvb; - int old_offset, end_offset; + int end_offset; gint8 class; gboolean pc, ind; gint32 tag; guint32 len; - old_offset=offset; offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); end_offset=offset+len; diff --git a/asn1/smrse/packet-smrse-template.c b/asn1/smrse/packet-smrse-template.c index ca400b9214..c6a8f2781c 100644 --- a/asn1/smrse/packet-smrse-template.c +++ b/asn1/smrse/packet-smrse-template.c @@ -76,13 +76,11 @@ dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) proto_item *item = NULL; proto_tree *tree = NULL; guint8 reserved, tag; - guint16 length; int offset=0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); reserved=tvb_get_guint8(tvb, 0); - length=tvb_get_ntohs(tvb,1); tag=tvb_get_guint8(tvb, 3); if( reserved!= 126 ) diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c index a07c19cb2b..8773ec30b3 100644 --- a/asn1/spnego/packet-spnego-template.c +++ b/asn1/spnego/packet-spnego-template.c @@ -994,7 +994,9 @@ dissect_spnego_krb5_cfx_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo { guint8 flags; guint16 ec; +#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) guint16 rrc; +#endif int checksum_size; int start_offset=offset; @@ -1024,7 +1026,9 @@ dissect_spnego_krb5_cfx_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo offset += 2; /* RRC */ +#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) rrc = tvb_get_ntohs(tvb, offset); +#endif proto_tree_add_item(tree, hf_spnego_krb5_cfx_rrc, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; -- cgit v1.2.3