aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-06-19 18:47:35 +0000
committerBill Meier <wmeier@newsguy.com>2011-06-19 18:47:35 +0000
commitd2269ce7d563c9343f4b71da4cd09bc6fb5080e7 (patch)
tree1bb1d49e5bd617abce454558411c1a7e0c4c4722
parentdfdeeb559535e20b78112405baf3d4f87fe2a961 (diff)
Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
-rw-r--r--epan/dissectors/packet-dcm.c2
-rw-r--r--epan/dissectors/packet-dec-bpdu.c3
-rw-r--r--epan/dissectors/packet-dplay.c4
-rw-r--r--epan/dissectors/packet-dtls.c2
-rw-r--r--epan/dissectors/packet-eap.c3
-rw-r--r--epan/dissectors/packet-fcels.c3
-rw-r--r--epan/dissectors/packet-fcp.c8
-rw-r--r--epan/dissectors/packet-fcswils.c5
-rw-r--r--epan/dissectors/packet-fix.c2
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c2
-rw-r--r--epan/dissectors/packet-hsrp.c3
-rw-r--r--epan/dissectors/packet-imf.c3
-rw-r--r--epan/dissectors/packet-ipmi-picmg.c3
-rw-r--r--epan/dissectors/packet-ipmi-storage.c4
-rw-r--r--epan/dissectors/packet-ipv6.c5
-rw-r--r--epan/dissectors/packet-isakmp.c3
-rw-r--r--epan/dissectors/packet-isup.c2
-rw-r--r--epan/dissectors/packet-lapd.c3
-rw-r--r--epan/dissectors/packet-mrp-mmrp.c14
-rw-r--r--epan/dissectors/packet-nbns.c3
-rw-r--r--epan/dissectors/packet-pana.c2
-rw-r--r--epan/dissectors/packet-pcep.c2
-rw-r--r--epan/dissectors/packet-quakeworld.c4
-rw-r--r--epan/dissectors/packet-radiotap.c2
-rw-r--r--epan/dissectors/packet-rlc.c3
-rw-r--r--epan/dissectors/packet-rmt-norm.c2
-rw-r--r--epan/dissectors/packet-sccpmg.c2
-rw-r--r--epan/dissectors/packet-sdp.c2
-rw-r--r--epan/dissectors/packet-sebek.c3
-rw-r--r--epan/dissectors/packet-skinny.c3
-rw-r--r--epan/dissectors/packet-stat.c2
-rw-r--r--epan/dissectors/packet-synphasor.c4
-rw-r--r--epan/dissectors/packet-tn3270.c2
-rw-r--r--epan/dissectors/packet-tn5250.c2
-rw-r--r--epan/dissectors/packet-uma.c3
-rw-r--r--epan/dissectors/packet-x11.c3
36 files changed, 21 insertions, 97 deletions
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index d629fe8df6..fe7d4277d8 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -6121,10 +6121,8 @@ dissect_dcm_pdv_body(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gchar *tag_value = NULL;
gboolean dummy = FALSE;
- guint32 startpos = 0;
guint32 endpos = 0;
- startpos = offset;
endpos = offset + pdv_body_len;
if (pdv->syntax == DCM_UNK) {
diff --git a/epan/dissectors/packet-dec-bpdu.c b/epan/dissectors/packet-dec-bpdu.c
index 6fbbd6a1f1..b54b341033 100644
--- a/epan/dissectors/packet-dec-bpdu.c
+++ b/epan/dissectors/packet-dec-bpdu.c
@@ -108,7 +108,6 @@ static const char cont_sep[] = ", ";
static void
dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint8 protocol_version;
guint8 bpdu_type;
guint8 flags;
proto_tree *bpdu_tree;
@@ -134,8 +133,6 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
FALSE);
bpdu_tree = proto_item_add_subtree(ti, ett_dec_bpdu);
- protocol_version = tvb_get_guint8(tvb, BPDU_VERSION);
-
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_proto_id, tvb,
BPDU_DEC_CODE, 1, FALSE);
diff --git a/epan/dissectors/packet-dplay.c b/epan/dissectors/packet-dplay.c
index 08f402c3b3..902a624cdc 100644
--- a/epan/dissectors/packet-dplay.c
+++ b/epan/dissectors/packet-dplay.c
@@ -466,12 +466,10 @@ static gint dissect_sockaddr_in(proto_tree *tree, tvbuff_t *tvb, gint offset)
static gint dissect_session_desc(proto_tree *tree, tvbuff_t *tvb, gint offset)
{
- gint data_len;
guint32 flags;
proto_item *flags_item = NULL;
proto_tree *flags_tree = NULL;
- data_len = tvb_get_letohl(tvb, offset);
flags = tvb_get_letohl(tvb, offset+4);
proto_tree_add_item(tree, hf_dplay_sess_desc_length, tvb, offset, 4, TRUE); offset += 4;
@@ -1013,11 +1011,9 @@ static void dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 message_type;
guint16 second_message_type = G_MAXUINT16;
guint16 proto_version;
- guint16 packet_size;
guint32 dplay_id;
guint8 play_id[] = {'p','l','a','y'};
- packet_size = tvb_get_letohs(tvb, 0);
dplay_id = tvb_get_letohl(tvb, 20);
message_type = tvb_get_letohs(tvb, 24);
proto_version = tvb_get_letohs(tvb, 26);
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index 8645783f2a..dad0c8dbb7 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -611,12 +611,10 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
guint8 next_byte;
proto_tree *ti;
proto_tree *dtls_record_tree;
- guint32 available_bytes;
SslAssociation* association;
SslDataInfo *appl_data;
ti = NULL;
dtls_record_tree = NULL;
- available_bytes = tvb_length_remaining(tvb, offset);
/*
* Get the record layer fields of interest
diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c
index 23a5435c00..0bd7f8114d 100644
--- a/epan/dissectors/packet-eap.c
+++ b/epan/dissectors/packet-eap.c
@@ -619,7 +619,6 @@ static int
dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 eap_code;
- guint8 eap_id;
guint16 eap_len;
guint8 eap_type;
gint len;
@@ -706,8 +705,6 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (eap_code == EAP_FAILURE)
conversation_state->leap_state = -1;
- eap_id = tvb_get_guint8(tvb, 1);
-
eap_len = tvb_get_ntohs(tvb, 2);
len = eap_len;
diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c
index cb75eea6f7..76592032fa 100644
--- a/epan/dissectors/packet-fcels.c
+++ b/epan/dissectors/packet-fcels.c
@@ -1863,7 +1863,7 @@ dissect_fcels_rnid (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
- int clen, slen;
+ int clen;
proto_tree *rnid_tree;
if (tree) {
@@ -1881,7 +1881,6 @@ dissect_fcels_rnid (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
clen = tvb_get_guint8 (tvb, offset+5);
proto_tree_add_text (rnid_tree, tvb, offset+5, 1,
"Common Identification Data Length: %u", clen);
- slen = tvb_get_guint8 (tvb, offset+7);
proto_tree_add_item (rnid_tree, hf_fcels_spidlen, tvb, offset+7,
1, FALSE);
if (clen) {
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index b0270cfbf6..2aa2a1507d 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -387,8 +387,7 @@ static void
dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree *tree, conversation_t *conversation, fc_hdr *fchdr, fcp_conv_data_t *fcp_conv_data)
{
int offset = 0;
- int len,
- add_len = 0;
+ int add_len = 0;
guint8 flags, rwflags, lun0;
guint16 lun=0xffff;
tvbuff_t *cdb_tvb;
@@ -401,11 +400,6 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
if (flags) {
add_len = tvb_get_guint8 (tvb, offset+11) & 0x7C;
add_len = add_len >> 2;
-
- len = FCP_DEF_CMND_LEN + add_len;
- }
- else {
- len = FCP_DEF_CMND_LEN;
}
hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index 0ddb4c94d1..98380ec8c0 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -1156,7 +1156,6 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
proto_tree *dev_tree;
- int addrfmt, evtype;
int numrec, i;
proto_item *subti;
@@ -1164,10 +1163,6 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
if (!isreq)
return;
- evtype = tvb_get_guint8 (tvb, offset+4);
- addrfmt = evtype & 0x0F;
- evtype = evtype >> 4;
-
proto_tree_add_item (rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
1, 0);
proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
diff --git a/epan/dissectors/packet-fix.c b/epan/dissectors/packet-fix.c
index e645e61d98..890b32939c 100644
--- a/epan/dissectors/packet-fix.c
+++ b/epan/dissectors/packet-fix.c
@@ -235,7 +235,6 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *value;
char *tag_str;
fix_parameter *tag;
- int check_sum = 0;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FIX");
@@ -355,7 +354,6 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
for (j = 0; j < field_offset; j++, data++) {
sum += *data;
}
- check_sum = 1;
sum_ok = (atoi(value) == sum);
if (sum_ok) {
item = proto_tree_add_string_format_value(fix_tree, fix_fields[i].hf_id, tvb, field_offset, tag->field_len,
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index ed8f516239..e0c0f0927d 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -3794,11 +3794,9 @@ static guint16
de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- guint curr_len;
const gchar *str;
guchar pdp_type_org, pdp_type_num;
- curr_len = len;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-hsrp.c b/epan/dissectors/packet-hsrp.c
index 484173270a..f32062768e 100644
--- a/epan/dissectors/packet-hsrp.c
+++ b/epan/dissectors/packet-hsrp.c
@@ -454,7 +454,7 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset2 = offset;
if (type == 1 && len == 40) {
/* Group State TLV */
- guint8 version,opcode, state = 0, ipver;
+ guint8 opcode, state = 0, ipver;
guint32 hellotime, holdtime;
proto_tree *group_state_tlv;
@@ -464,7 +464,6 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset+=2;
- version = tvb_get_guint8(tvb, offset);
opcode = tvb_get_guint8(tvb, offset+1);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index f784d9940c..0cc3532937 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -481,7 +481,6 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint max_length;
guint8 *key;
gboolean last_field = FALSE;
- gboolean dissected = FALSE;
tvbuff_t *next_tvb;
struct imf_field *f_info;
@@ -608,7 +607,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, end_offset);
- dissected = dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
+ dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
pinfo->private_data = pd_save;
} else {
diff --git a/epan/dissectors/packet-ipmi-picmg.c b/epan/dissectors/packet-ipmi-picmg.c
index 301c825a78..418fe811df 100644
--- a/epan/dissectors/packet-ipmi-picmg.c
+++ b/epan/dissectors/packet-ipmi-picmg.c
@@ -532,9 +532,6 @@ static const struct true_false_string tfs_36_fail_unknown = {
static void
rs00(tvbuff_t *tvb, proto_tree *tree)
{
- guint8 v;
-
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_picmg_00_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_picmg_00_max_fruid, tvb, 1, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_picmg_00_ipmc_fruid, tvb, 2, 1, TRUE);
diff --git a/epan/dissectors/packet-ipmi-storage.c b/epan/dissectors/packet-ipmi-storage.c
index 6decc1340e..139b466483 100644
--- a/epan/dissectors/packet-ipmi-storage.c
+++ b/epan/dissectors/packet-ipmi-storage.c
@@ -310,9 +310,7 @@ rs20(tvbuff_t *tvb, proto_tree *tree)
static const int *ops[] = { &hf_ipmi_stor_20_op_overflow, &hf_ipmi_stor_20_op_update,
&hf_ipmi_stor_20_op_delete, &hf_ipmi_stor_20_op_partial_add, &hf_ipmi_stor_20_op_reserve,
&hf_ipmi_stor_20_op_allocinfo, NULL };
- guint8 v;
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_stor_20_sdr_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_20_rec_count, tvb, 1, 2, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_20_free_space, tvb, 3, 2, TRUE);
@@ -480,9 +478,7 @@ rs40(tvbuff_t *tvb, proto_tree *tree)
{
static const int *ops[] = { &hf_ipmi_stor_40_op_overflow, &hf_ipmi_stor_40_op_delete,
&hf_ipmi_stor_40_op_partial_add, &hf_ipmi_stor_40_op_reserve, &hf_ipmi_stor_40_op_allocinfo, NULL };
- guint8 v;
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_stor_40_sel_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_40_entries, tvb, 1, 2, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_40_free_space, tvb, 3, 2, TRUE);
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 697ee0f5f0..2442a8e146 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -1036,15 +1036,12 @@ dissect_shimopts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
gint padding;
proto_tree *opt_tree;
proto_item *ti;
- guint8 tmp[2];
const gchar *ctype;
p = offset;
- tmp[0] = tvb_get_guint8(tvb, p++);
- tmp[1] = tvb_get_guint8(tvb, p++);
- p += 2;
+ p += 4;
len = tvb_get_ntohs(tvb, offset+2);
padding = 7 - ((len + 3) % 8);
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 8d02b9b5ee..f8a8b7e4a3 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -4446,7 +4446,7 @@ dissect_enc(tvbuff_t *tvb,
{
#ifdef HAVE_LIBGCRYPT
ikev2_decrypt_data_t *key_info = NULL;
- gint iv_len, encr_data_len, icd_len, encr_key_len, decr_data_len, md_len;
+ gint iv_len, encr_data_len, icd_len, decr_data_len, md_len;
guint8 pad_len;
guchar *iv = NULL, *encr_data = NULL, *decr_data = NULL, *entire_message = NULL, *md = NULL;
gcry_cipher_hd_t cipher_hd;
@@ -4459,7 +4459,6 @@ dissect_enc(tvbuff_t *tvb,
if (pinfo->private_data) {
key_info = (ikev2_decrypt_data_t*)(pinfo->private_data);
- encr_key_len = key_info->encr_spec->key_len;
iv_len = key_info->encr_spec->iv_len;
icd_len = key_info->auth_spec->trunc_len;
encr_data_len = length - iv_len - icd_len;
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 4e92181fa0..8ebd08be64 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -3613,7 +3613,6 @@ static void
dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
{
- guint8 application_transport_instruction_ind;
guint8 si_and_apm_seg_ind;
guint8 apm_Segmentation_local_ref = 0;
guint16 aci16;
@@ -3647,7 +3646,6 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf
/* Octet 2 */
proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "Application transport instruction indicators: ");
- application_transport_instruction_ind = tvb_get_guint8(parameter_tvb, offset);
proto_tree_add_item( parameter_tree, hf_isup_extension_ind, parameter_tvb, offset, 1, FALSE );
proto_tree_add_item( parameter_tree, hf_isup_app_Send_notification_ind, parameter_tvb, offset, 1, FALSE );
proto_tree_add_item( parameter_tree, hf_isup_app_Release_call_ind, parameter_tvb, offset, 1, FALSE );
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index 74acc1a98c..9453808d6f 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -207,7 +207,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean bit;
guint8 i, ones = 0, data[MAX_LAPD_PACKET_LEN];
int data_len = 0;
- guint offset = 0, last_packet_end_offset = 0, available;
+ guint offset = 0, available;
guint8 *buff;
tvbuff_t *new_tvb;
@@ -280,7 +280,6 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_set_free_cb(new_tvb, g_free);
add_new_data_source(pinfo, new_tvb, "Decoded LAPD bitstream");
dissect_lapd(new_tvb, pinfo, tree);
- last_packet_end_offset = offset -1;
data_len = 0;
state = FLAGS;
bit_offset++;
diff --git a/epan/dissectors/packet-mrp-mmrp.c b/epan/dissectors/packet-mrp-mmrp.c
index e1749bf0d6..bf0aa55387 100644
--- a/epan/dissectors/packet-mrp-mmrp.c
+++ b/epan/dissectors/packet-mrp-mmrp.c
@@ -220,7 +220,7 @@ static void
dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Set up structures needed to add the protocol subtrees and manage them */
- proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti, *first_value_ti;
+ proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti;
proto_tree *mmrp_tree, *msg_tree, *attr_list_tree, *vect_attr_tree;
/* Make entries in Protocol column and Info column on summary display */
@@ -311,9 +311,9 @@ dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (attribute_type == MMRP_ATTRIBUTE_TYPE_MAC) {
/* MMRP FirstValue is a Mac Adress*/
- first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
- MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
- attribute_length, ENC_NA);
+ proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+ MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+ attribute_length, ENC_NA);
/* Decode three packed events. */
offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
@@ -322,9 +322,9 @@ dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else if (attribute_type == MMRP_ATTRIBUTE_TYPE_SERVICE) {
/* MMRP Service Requierment*/
- first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
- MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
- attribute_length, ENC_NA);
+ proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+ MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+ attribute_length, ENC_NA);
offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
number_of_values);
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c
index 9a779e2329..fb27ba07ed 100644
--- a/epan/dissectors/packet-nbns.c
+++ b/epan/dissectors/packet-nbns.c
@@ -1037,7 +1037,7 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
column_info *cinfo;
proto_tree *nbns_tree = NULL;
proto_item *ti;
- guint16 id, flags, opcode, rcode, quest, ans, auth, add;
+ guint16 id, flags, opcode, quest, ans, auth, add;
int cur_off;
nbns_data_offset = offset;
@@ -1049,7 +1049,6 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
id = tvb_get_ntohs(tvb, offset + NBNS_ID);
flags = tvb_get_ntohs(tvb, offset + NBNS_FLAGS);
opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
- rcode = (guint16) (flags & F_RCODE);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s",
diff --git a/epan/dissectors/packet-pana.c b/epan/dissectors/packet-pana.c
index 747bcc01a8..0f9f23baba 100644
--- a/epan/dissectors/packet-pana.c
+++ b/epan/dissectors/packet-pana.c
@@ -484,7 +484,6 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 msg_type;
guint32 msg_length;
guint32 avp_length;
- guint32 session_id;
guint32 seq_num;
conversation_t *conversation;
pana_conv_info_t *pana_info;
@@ -498,7 +497,6 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_length = tvb_get_ntohs(tvb, 2);
flags = tvb_get_ntohs(tvb, 4);
msg_type = tvb_get_ntohs(tvb, 6);
- session_id = tvb_get_ntohl(tvb, 8);
seq_num = tvb_get_ntohl(tvb, 12);
avp_length = msg_length - 16;
diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c
index b4738ea32a..ec2e7b682b 100644
--- a/epan/dissectors/packet-pcep.c
+++ b/epan/dissectors/packet-pcep.c
@@ -949,7 +949,6 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
guint16 AS_number;
guint8 reserved;
guint8 attribute;
- guint16 op_AS_nu_high_oct;
int l;
l = (l_and_or_type& Mask_L)>>7;
@@ -957,7 +956,6 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
if(obj_class == PCEP_XRO_OBJ){
reserved = tvb_get_guint8(tvb, offset+2);
attribute = tvb_get_guint8(tvb, offset+3);
- op_AS_nu_high_oct = tvb_get_ntohs(tvb, offset+4);
AS_number = tvb_get_ntohs(tvb, offset+6);
ti = proto_tree_add_item(pcep_subobj_tree, pcep_filter[PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM], tvb, offset, length, FALSE);
diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c
index aa705d0585..b25aa89330 100644
--- a/epan/dissectors/packet-quakeworld.c
+++ b/epan/dissectors/packet-quakeworld.c
@@ -203,8 +203,6 @@ Cmd_TokenizeString(char* text)
{
int i;
int start;
- int length;
-
/* clear the args from the last string */
for (i=0 ; i<cmd_argc ; i++)
@@ -221,8 +219,6 @@ Cmd_TokenizeString(char* text)
start++;
}
- length = 0;
-
if (*text == '\n') {
/* a newline seperates commands in the buffer */
text++;
diff --git a/epan/dissectors/packet-radiotap.c b/epan/dissectors/packet-radiotap.c
index 57252213b9..6a7f9e4cdb 100644
--- a/epan/dissectors/packet-radiotap.c
+++ b/epan/dissectors/packet-radiotap.c
@@ -1858,12 +1858,10 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree) {
int channel;
- guint8 maxpower;
flags = tvb_get_letohl(tvb, offset);
freq = tvb_get_letohs(tvb, offset + 4);
channel = tvb_get_guint8(tvb, offset + 6);
- maxpower = tvb_get_guint8(tvb, offset + 7);
proto_tree_add_uint(radiotap_tree,
hf_radiotap_xchannel,
tvb, offset + 6, 1,
diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c
index 79322d26bb..fa5f32dace 100644
--- a/epan/dissectors/packet-rlc.c
+++ b/epan/dissectors/packet-rlc.c
@@ -1123,7 +1123,7 @@ static void dissect_rlc_um(enum channel_type channel, tvbuff_t *tvb, packet_info
fp_info *fpinf;
rlc_info *rlcinf;
guint32 orig_num;
- guint8 seq, ext;
+ guint8 seq;
guint8 next_byte, offs = 0;
gint16 pos, num_li = 0;
gboolean is_truncated, li_is_on_2_bytes;
@@ -1131,7 +1131,6 @@ static void dissect_rlc_um(enum channel_type channel, tvbuff_t *tvb, packet_info
next_byte = tvb_get_guint8(tvb, offs++);
seq = next_byte >> 1;
- ext = next_byte & 0x01;
/* show sequence number and extension bit */
if (tree) {
diff --git a/epan/dissectors/packet-rmt-norm.c b/epan/dissectors/packet-rmt-norm.c
index 093e7fef56..0645829846 100644
--- a/epan/dissectors/packet-rmt-norm.c
+++ b/epan/dissectors/packet-rmt-norm.c
@@ -310,14 +310,12 @@ static void dissect_norm_data(struct _norm *norm, proto_tree *tree,
static void dissect_norm_info(struct _norm *norm, proto_tree *tree,
tvbuff_t *tvb, guint offset, packet_info *pinfo _U_)
{
- guint8 flags;
proto_item *ti;
proto_tree *flag_tree;
offset = dissect_grrtetc(tree, tvb, offset);
ti = proto_tree_add_item(tree, hf.flags, tvb, offset, 1, FALSE);
- flags = tvb_get_guint8(tvb, offset);
flag_tree = proto_item_add_subtree(ti, ett.flags);
proto_tree_add_item(flag_tree, hf.flag.repair, tvb, offset, 1, FALSE);
proto_tree_add_item(flag_tree, hf.flag.explicit, tvb, offset, 1, FALSE);
diff --git a/epan/dissectors/packet-sccpmg.c b/epan/dissectors/packet-sccpmg.c
index 245dd2f305..374ae45e4d 100644
--- a/epan/dissectors/packet-sccpmg.c
+++ b/epan/dissectors/packet-sccpmg.c
@@ -209,11 +209,9 @@ static void
dissect_sccpmg_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccpmg_tree)
{
guint8 message_type;
- guint8 offset = 0;
/* Extract the message type; all other processing is based on this */
message_type = tvb_get_guint8(tvb, SCCPMG_MESSAGE_TYPE_OFFSET);
- offset = SCCPMG_MESSAGE_TYPE_LENGTH;
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, sccpmg_message_type_acro_values, "Unknown"));
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c
index 14a579a400..ce4620e148 100644
--- a/epan/dissectors/packet-sdp.c
+++ b/epan/dissectors/packet-sdp.c
@@ -1490,7 +1490,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
proto_item *fmtp_item, *media_format_item;
proto_tree *fmtp_tree;
gint offset, next_offset, tokenlen, n, colon_offset;
- gint start_offset;
/*??guint8 *field_name;*/
guint8 *payload_type;
guint8 *attribute_value;
@@ -1562,7 +1561,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
tokenlen = next_offset - offset;
- start_offset = offset;
proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
offset, tokenlen, FALSE);
diff --git a/epan/dissectors/packet-sebek.c b/epan/dissectors/packet-sebek.c
index 96f1ec73bc..d75e428304 100644
--- a/epan/dissectors/packet-sebek.c
+++ b/epan/dissectors/packet-sebek.c
@@ -124,7 +124,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *sebek_tree;
proto_item *ti;
int offset = 0;
- int datalen = 0;
nstime_t ts;
int sebek_ver = 0;
int sebek_type = 0;
@@ -202,7 +201,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
offset += 12;
- datalen = tvb_get_letohl(tvb, offset);
proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
offset += 4;
@@ -246,7 +244,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
offset += 12;
- datalen = tvb_get_ntohl(tvb, offset);
proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
offset += 4;
diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c
index 1c4af5bc47..b6eb0e25c2 100644
--- a/epan/dissectors/packet-skinny.c
+++ b/epan/dissectors/packet-skinny.c
@@ -1259,8 +1259,7 @@ dissect_skinny_xml(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, const gi
next_tvb = tvb_new_subset(tvb, start, length, -1);
handle = dissector_get_string_handle(media_type_dissector_table, "text/xml");
if (handle != NULL) {
- gboolean dissected;
- dissected = call_dissector(handle, next_tvb, pinfo, subtree);
+ call_dissector(handle, next_tvb, pinfo, subtree);
}
}
diff --git a/epan/dissectors/packet-stat.c b/epan/dissectors/packet-stat.c
index f5a0f74e40..a6efc5a58b 100644
--- a/epan/dissectors/packet-stat.c
+++ b/epan/dissectors/packet-stat.c
@@ -122,7 +122,6 @@ dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
proto_item* sub_item = NULL;
proto_tree* sub_tree = NULL;
gint32 res;
- gint32 state;
if (tree) {
sub_item = proto_tree_add_item(tree, hf_stat_stat_res, tvb,
@@ -135,7 +134,6 @@ dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_res,offset);
if (res==STAT_SUCC) {
- state = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_state,offset);
} else {
offset += 4;
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c
index 4bc911db80..7e22d2aa05 100644
--- a/epan/dissectors/packet-synphasor.c
+++ b/epan/dissectors/packet-synphasor.c
@@ -650,7 +650,7 @@ static gint dissect_header(tvbuff_t *tvb, proto_tree *tree)
proto_item *temp_item;
gint offset = 0;
- guint16 framesize, idcode;
+ guint16 framesize;
/* SYNC and flags */
temp_item = proto_tree_add_item(tree, hf_sync, tvb, offset, 2, FALSE);
@@ -665,7 +665,7 @@ static gint dissect_header(tvbuff_t *tvb, proto_tree *tree)
/* IDCODE */
proto_tree_add_item(tree, hf_idcode, tvb, offset, 2, FALSE);
- idcode = tvb_get_ntohs(tvb, offset); offset += 2;
+ offset += 2;
/* SOC */
{
diff --git a/epan/dissectors/packet-tn3270.c b/epan/dissectors/packet-tn3270.c
index 43182ce78e..a3af20b553 100644
--- a/epan/dissectors/packet-tn3270.c
+++ b/epan/dissectors/packet-tn3270.c
@@ -4997,7 +4997,6 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *tn3270_tree;
proto_item *ti;
gint offset = 0;
- gint tn3270_cmd = 0;
conversation_t *conversation;
tn3270_conv_info_t *tn3270_info = NULL;
@@ -5026,7 +5025,6 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += dissect_tn3270e_header(tn3270_tree, tvb, offset);
}
while (tvb_offset_exists(tvb, offset)) {
- tn3270_cmd = tvb_get_guint8(tvb, offset);
if (pinfo->srcport == tn3270_info->outbound_port) {
col_set_str(pinfo->cinfo, COL_INFO, "TN3270 Data from Mainframe");
offset += dissect_outbound_stream(tn3270_tree, tvb, offset);
diff --git a/epan/dissectors/packet-tn5250.c b/epan/dissectors/packet-tn5250.c
index c029bf6ab9..eb7f84e6b2 100644
--- a/epan/dissectors/packet-tn5250.c
+++ b/epan/dissectors/packet-tn5250.c
@@ -3078,7 +3078,6 @@ static guint32
dissect_start_of_header(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offset)
{
int start = offset;
- int length = 0;
/*TODO: Warn on invalid length. <= 7 */
static const int *byte[] = {
@@ -3121,7 +3120,6 @@ dissect_start_of_header(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offset)
{ 0, 0, 0, 0 }
};
- length = tvb_get_guint8(tvb, offset);
offset += tn5250_add_hf_items(tn5250_tree, tvb, offset,
start_of_header_fields);
diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c
index 073c692dd0..b9a11befb3 100644
--- a/epan/dissectors/packet-uma.c
+++ b/epan/dissectors/packet-uma.c
@@ -922,7 +922,7 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_item *urr_ie_item;
proto_tree *urr_ie_tree;
char *string;
- guint16 GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port, communication_port;
+ guint16 GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port;
guint32 udr;
conversation_t *conversation;
address dst_addr, null_addr;
@@ -1117,7 +1117,6 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
break;
case 25:
/* 11.2.25 Communication Port Identity */
- communication_port = tvb_get_ntohs(tvb,ie_offset);
proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, FALSE);
break;
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c
index 39d5fea98b..3a22dbd7ee 100644
--- a/epan/dissectors/packet-x11.c
+++ b/epan/dissectors/packet-x11.c
@@ -5535,14 +5535,13 @@ dissect_x11_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean little_endian)
{
int offset = 0, *offsetp = &offset, left;
- unsigned char errorcode, error;
+ unsigned char errorcode;
proto_item *ti;
proto_tree *t;
ti = proto_tree_add_item(tree, proto_x11, tvb, 0, -1, FALSE);
t = proto_item_add_subtree(ti, ett_x11);
- error = tvb_get_guint8(tvb, offset);
CARD8(error);
errorcode = tvb_get_guint8(tvb, offset);