Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.

svn path=/trunk/; revision=37716
daniel/osmux
Bill Meier 2011-06-19 18:47:35 +00:00
parent dfdeeb5595
commit d2269ce7d5
36 changed files with 21 additions and 97 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 */
{

View File

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

View File

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

View File

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

View File

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