fix [-Wunused-but-set-variable]

svn path=/trunk/; revision=39803
This commit is contained in:
Anders Broman 2011-11-12 12:37:38 +00:00
parent 0f0f260fb4
commit fa7ea2ea34
8 changed files with 28 additions and 42 deletions

View File

@ -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;

View File

@ -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 )

View File

@ -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;

View File

@ -1222,14 +1222,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) {
@ -1376,11 +1374,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) {
@ -1436,12 +1432,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) {
@ -1515,12 +1509,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) {
@ -1595,12 +1587,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;
@ -1679,13 +1670,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;
@ -1754,13 +1744,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;
@ -5352,7 +5341,7 @@ dissect_h248_SigParameterV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
/*--- End of included file: packet-h248-fn.c ---*/
#line 1339 "../../asn1/h248/packet-h248-template.c"
#line 1328 "../../asn1/h248/packet-h248-template.c"
static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle);
@ -6745,7 +6734,7 @@ void proto_register_h248(void) {
NULL, HFILL }},
/*--- End of included file: packet-h248-hfarr.c ---*/
#line 1479 "../../asn1/h248/packet-h248-template.c"
#line 1468 "../../asn1/h248/packet-h248-template.c"
GCP_HF_ARR_ELEMS("h248",h248_arrel)
@ -6914,7 +6903,7 @@ void proto_register_h248(void) {
&ett_h248_SigParameterV1,
/*--- End of included file: packet-h248-ettarr.c ---*/
#line 1497 "../../asn1/h248/packet-h248-template.c"
#line 1486 "../../asn1/h248/packet-h248-template.c"
};
module_t *h248_module;

View File

@ -4924,8 +4924,9 @@ static void ikev2_uat_data_update_cb(void* p, const char** err) {
void
proto_register_isakmp(void)
{
#ifdef HAVE_LIBGCRYPT
module_t *isakmp_module;
#endif
static hf_register_info hf[] = {
{ &hf_isakmp_icookie,
{ "Initiator cookie", "isakmp.icookie",
@ -6010,8 +6011,8 @@ proto_register_isakmp(void)
register_dissector("isakmp", dissect_isakmp, proto_isakmp);
isakmp_module = prefs_register_protocol(proto_isakmp, isakmp_prefs_apply_cb);
#ifdef HAVE_LIBGCRYPT
isakmp_module = prefs_register_protocol(proto_isakmp, isakmp_prefs_apply_cb);
ikev1_uat = uat_new("IKEv1 Decryption Table",
sizeof(ikev1_uat_data_key_t),
"ikev1_decryption_table",

View File

@ -692,7 +692,9 @@ dissect_payload_kink_encrypt(packet_info *pinfo, tvbuff_t *tvb, int offset, prot
guint8 next_payload;
guint8 reserved;
guint payload_length;
#ifdef HAVE_KERBEROS
gint encrypt_length;
#endif
guint8 inner_next_pload;
guint32 reserved2;
guint16 inner_payload_length;
@ -701,8 +703,9 @@ dissect_payload_kink_encrypt(packet_info *pinfo, tvbuff_t *tvb, int offset, prot
payload_length = tvb_get_ntohs(tvb,offset + TO_PAYLOAD_LENGTH);
start_payload_offset = offset;
#ifdef HAVE_KERBEROS
encrypt_length = payload_length - FROM_NP_TO_PL;
#endif
/* Make the subtree */
ti = proto_tree_add_text(tree, tvb, offset, payload_length,"KINK_ENCRYPT");
payload_kink_encrypt_tree = proto_item_add_subtree(ti, ett_payload_kink_encrypt);

View File

@ -504,13 +504,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 )
@ -696,7 +694,7 @@ void proto_register_smrse(void) {
"SMS_Address", HFILL }},
/*--- End of included file: packet-smrse-hfarr.c ---*/
#line 163 "../../asn1/smrse/packet-smrse-template.c"
#line 161 "../../asn1/smrse/packet-smrse-template.c"
};
/* List of subtrees */
@ -718,7 +716,7 @@ void proto_register_smrse(void) {
&ett_smrse_RPAlertSC,
/*--- End of included file: packet-smrse-ettarr.c ---*/
#line 169 "../../asn1/smrse/packet-smrse-template.c"
#line 167 "../../asn1/smrse/packet-smrse-template.c"
};
/* Register protocol */

View File

@ -1475,7 +1475,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;
@ -1505,7 +1507,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;
@ -1961,7 +1965,7 @@ void proto_register_spnego(void) {
NULL, HFILL }},
/*--- End of included file: packet-spnego-hfarr.c ---*/
#line 1395 "../../asn1/spnego/packet-spnego-template.c"
#line 1399 "../../asn1/spnego/packet-spnego-template.c"
};
/* List of subtrees */
@ -1983,7 +1987,7 @@ void proto_register_spnego(void) {
&ett_spnego_InitialContextToken_U,
/*--- End of included file: packet-spnego-ettarr.c ---*/
#line 1405 "../../asn1/spnego/packet-spnego-template.c"
#line 1409 "../../asn1/spnego/packet-spnego-template.c"
};
/* Register protocol */