Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38085
This commit is contained in:
parent
e4b18600fb
commit
5db6069274
|
@ -651,7 +651,6 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
gint offset;
|
||||
gint sbus_eth_len;
|
||||
guint sbus_crc_calc;
|
||||
guint8 sbus_version;
|
||||
guint8 sbus_attribut;
|
||||
guint8 sbus_media_cnt;
|
||||
guint8 sbus_fio_cnt;
|
||||
|
@ -664,7 +663,6 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint8 sbus_rdwr_block_tlg;
|
||||
guint8 sbus_rdwr_block_type;
|
||||
guint8 sbus_rdwr_ack_nak;
|
||||
guint8 sbus_sysinfo_number;
|
||||
guint8 sbus_quint8_helper0;
|
||||
guint32 sbus_binarymasked;
|
||||
guint32 sbus_binaries;
|
||||
|
@ -903,7 +901,6 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hf_sbus_length, tvb, offset, 4, FALSE);
|
||||
offset += 4;
|
||||
|
||||
sbus_version = tvb_get_guint8(tvb,offset);
|
||||
proto_tree_add_item(ethsbus_tree,
|
||||
hf_sbus_version, tvb, offset, 1, FALSE);
|
||||
offset += 1;
|
||||
|
@ -1170,11 +1167,9 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*Request for reading system info*/
|
||||
/*Syinfo 05 is not implemented as no serial baud is possible*/
|
||||
case SBUS_RD_SYSTEM_INFORMATION:
|
||||
sbus_sysinfo_number = (tvb_get_guint8(tvb,13));
|
||||
proto_tree_add_item(sbus_tree,
|
||||
hf_sbus_sysinfo_nr, tvb, offset, 1, FALSE);
|
||||
offset += 1;
|
||||
sbus_sysinfo_number = (tvb_get_guint8(tvb,14));
|
||||
proto_tree_add_item(sbus_tree,
|
||||
hf_sbus_sysinfo_nr, tvb, offset, 1, FALSE);
|
||||
offset += 1;
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
/*
|
||||
* Some Notes on using the SCSI Decoder:
|
||||
*
|
||||
* The SCSI decoder has been built right now that it is invoked directly by the
|
||||
* The SCSI decoder has been built right now so that it is invoked directly by the
|
||||
* SCSI transport layers as compared to the standard mechanism of being invoked
|
||||
* via a dissector chain. There are multiple reasons for this:
|
||||
* - The SCSI CDB is typically embedded inside the transport along with other
|
||||
* header fields that have nothing to do with SCSI. So, it is required to be
|
||||
|
||||
* done this way.
|
||||
* - Originally, Wireshark couldn't do filtering on protocol trees that were not
|
||||
* on the top level.
|
||||
*
|
||||
|
@ -4621,16 +4621,18 @@ static scsi_cdb_table_t spc[256] = {
|
|||
};
|
||||
|
||||
|
||||
/* This function must be called with walid pointers for both itlq and itl */
|
||||
/* This function must be called with valid pointers for both itlq and itl */
|
||||
void
|
||||
dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
gint devtype_arg, itlq_nexus_t *itlq, itl_nexus_t *itl)
|
||||
gint devtype_arg _U_, itlq_nexus_t *itlq, itl_nexus_t *itl)
|
||||
{
|
||||
int offset = 0;
|
||||
proto_item *ti;
|
||||
proto_tree *scsi_tree = NULL;
|
||||
guint8 opcode;
|
||||
#if 0
|
||||
scsi_device_type devtype;
|
||||
#endif
|
||||
const gchar *valstr;
|
||||
scsi_task_data_t *cdata;
|
||||
const char *old_proto;
|
||||
|
@ -4651,6 +4653,7 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
itlq->scsi_opcode=opcode;
|
||||
csdata=get_cmdset_data(itlq, itl);
|
||||
|
||||
#if 0 /* XXX: devtype never actually used ?? */
|
||||
if (devtype_arg != SCSI_DEV_UNKNOWN) {
|
||||
devtype = devtype_arg;
|
||||
} else {
|
||||
|
@ -4660,6 +4663,7 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
devtype = (scsi_device_type)scsi_def_devtype;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((valstr = match_strval (opcode, scsi_spc_vals)) == NULL) {
|
||||
valstr = match_strval(opcode, csdata->cdb_vals);
|
||||
|
@ -4737,7 +4741,6 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_item *ti;
|
||||
proto_tree *scsi_tree = NULL;
|
||||
guint8 opcode;
|
||||
scsi_device_type devtype;
|
||||
scsi_task_data_t *cdata;
|
||||
int payload_len;
|
||||
const char *old_proto;
|
||||
|
@ -4768,7 +4771,6 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
pinfo->current_proto="SCSI";
|
||||
|
||||
opcode = (guint8) cdata->itlq->scsi_opcode;
|
||||
devtype = cdata->itl->cmdset&SCSI_CMDSET_MASK;
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset,
|
||||
|
|
|
@ -3177,11 +3177,11 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
|
|||
for(nr_gap_block_number = 1; nr_gap_block_number <= number_of_nr_gap_blocks; nr_gap_block_number++) {
|
||||
proto_item *pi;
|
||||
proto_tree *pt;
|
||||
guint32 tsn_start;
|
||||
/*guint32 tsn_start;*/
|
||||
|
||||
start = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset);
|
||||
end = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH);
|
||||
tsn_start = cum_tsn_ack + start;
|
||||
/*tsn_start = cum_tsn_ack + start;*/
|
||||
|
||||
block_item = proto_tree_add_text(chunk_tree, chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH, "NR-Gap Acknowledgement for TSN %u to %u", cum_tsn_ack + start, cum_tsn_ack + end);
|
||||
block_tree = proto_item_add_subtree(block_item, ett_sctp_nr_sack_chunk_nr_gap_block);
|
||||
|
@ -3610,7 +3610,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
|
|||
sctp_half_assoc_t* ha,
|
||||
gboolean useinfo)
|
||||
{
|
||||
guint8 type, flags;
|
||||
guint8 type;
|
||||
guint16 length, padding_length, reported_length;
|
||||
gboolean result;
|
||||
proto_item *flags_item;
|
||||
|
@ -3623,7 +3623,6 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
|
|||
|
||||
/* first extract the chunk header */
|
||||
type = tvb_get_guint8(chunk_tvb, CHUNK_TYPE_OFFSET);
|
||||
flags = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET);
|
||||
length = tvb_get_ntohs(chunk_tvb, CHUNK_LENGTH_OFFSET);
|
||||
reported_length = tvb_reported_length(chunk_tvb);
|
||||
padding_length = reported_length - length;
|
||||
|
|
|
@ -124,10 +124,6 @@ de_sgsap_eps_loc_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
|
|||
static guint16
|
||||
de_sgsap_err_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
|
||||
{
|
||||
guint32 curr_offset;
|
||||
|
||||
curr_offset = offset;
|
||||
|
||||
/* 18.4.5 Erroneous message
|
||||
* The Erroneous message IE is a TLV IE that encapsulates the message in error.
|
||||
* Octet 3 - Octet n
|
||||
|
@ -324,12 +320,9 @@ de_sgsap_mm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
|
|||
static guint16
|
||||
de_sgsap_mme_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
|
||||
{
|
||||
guint32 curr_offset;
|
||||
guint name_len, tmp;
|
||||
guint8 *fqdn = NULL;
|
||||
|
||||
curr_offset = offset;
|
||||
|
||||
/* The MME name information element specifies the MME name and is coded as shown in figure 9.4.13.1. Octets 3
|
||||
* through n contain the name in the form of a fully qualified domain name (FQDN) as specified in 3GPP TS 23.003 [3].
|
||||
* The value part of the MME name information element (not including IEI and length indicator) shall have a length of 55
|
||||
|
@ -528,11 +521,9 @@ de_sgsap_ue_emm_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
|
|||
static guint16
|
||||
de_sgsap_vlr_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
|
||||
{
|
||||
guint32 curr_offset;
|
||||
guint name_len, tmp;
|
||||
guint8 *fqdn = NULL;
|
||||
|
||||
curr_offset = offset;
|
||||
/* The VLR name information element specifies the VLR name and is coded as shown in figure 9.4.22.1.
|
||||
* Octets 3 through n contain the VLR name in the form of a fully qualified domain name (FQDN)
|
||||
* as specified in IETF RFC 1035 [21].
|
||||
|
|
|
@ -108,7 +108,7 @@ static gint hf_sip_tc_user = -1;
|
|||
static gint hf_sip_tc_host = -1;
|
||||
static gint hf_sip_tc_port = -1;
|
||||
static gint hf_sip_tc_turi = -1;
|
||||
static gint hf_sip_contact_param = -1;
|
||||
static gint hf_sip_contact_param = -1;
|
||||
static gint hf_sip_resend = -1;
|
||||
static gint hf_sip_original_frame = -1;
|
||||
static gint hf_sip_matching_request_frame = -1;
|
||||
|
@ -1575,7 +1575,6 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o
|
|||
gboolean equals_found = FALSE;
|
||||
gboolean found_end_of_parameters = FALSE;
|
||||
gint parameter_name_end = 0;
|
||||
gint parameter_value_end;
|
||||
header_parameter_t *via_parameter;
|
||||
guint i = 0;
|
||||
|
||||
|
@ -1638,7 +1637,6 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o
|
|||
}
|
||||
|
||||
/* Note parameter name */
|
||||
parameter_value_end = current_offset;
|
||||
param_name = tvb_get_ephemeral_string(tvb, semicolon_offset+1,
|
||||
parameter_name_end - semicolon_offset - 1);
|
||||
|
||||
|
@ -2345,7 +2343,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
case POS_RACK :
|
||||
{
|
||||
int cseq_no_offset;
|
||||
int cseq_method_offset;
|
||||
/*int cseq_method_offset;*/
|
||||
|
||||
/* Add RAck tree */
|
||||
if (hdr_tree) {
|
||||
|
@ -2402,7 +2400,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
break;
|
||||
}
|
||||
}
|
||||
cseq_method_offset = sub_value_offset;
|
||||
/*cseq_method_offset = sub_value_offset;*/
|
||||
|
||||
if (sub_value_offset == linelen)
|
||||
{
|
||||
|
@ -3448,7 +3446,9 @@ guint sip_find_invite(packet_info *pinfo,
|
|||
guint32 cseq_number _U_,
|
||||
guint32 *response_time)
|
||||
{
|
||||
#if 0
|
||||
guint32 cseq_to_compare = 0;
|
||||
#endif
|
||||
sip_hash_key key;
|
||||
sip_hash_value *p_val = 0;
|
||||
sip_frame_result_value *sip_frame_result = NULL;
|
||||
|
@ -3507,8 +3507,10 @@ guint sip_find_invite(packet_info *pinfo,
|
|||
|
||||
if (p_val)
|
||||
{
|
||||
#if 0
|
||||
/* Table entry found, we'll use its value for comparison */
|
||||
cseq_to_compare = p_val->cseq;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -654,7 +654,7 @@ tipc_v2_set_info_col(tvbuff_t *tvb, packet_info *pinfo, guint8 user, guint8 msg_
|
|||
guint32 portNameInst, dword;
|
||||
guint32 portNameType, portNameInstLow, portNameInstHigh;
|
||||
guint8 error;
|
||||
guint8 item_size = 0;
|
||||
/*guint8 item_size = 0;*/
|
||||
|
||||
switch (user) {
|
||||
case TIPCv2_DATA_LOW:
|
||||
|
@ -703,8 +703,8 @@ tipc_v2_set_info_col(tvbuff_t *tvb, packet_info *pinfo, guint8 user, guint8 msg_
|
|||
break;
|
||||
case TIPCv2_ROUTE_DISTRIBUTOR:
|
||||
/* determine if it is TIPC v1.6 or v1.7 */
|
||||
dword = tvb_get_ntohl(tvb, 36);
|
||||
item_size = (dword >> 24) & 0xff;
|
||||
/*dword = tvb_get_ntohl(tvb, 36); */
|
||||
/*item_size = (dword >> 24) & 0xff;*/
|
||||
if ((handle_v2_as & V2_AS_1_6) || ((handle_v2_as & V2_AS_ALL) == 0)) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(msg_type, tipcv2_route_mtype_strings_1_6, "unknown"));
|
||||
} else {
|
||||
|
@ -1799,7 +1799,6 @@ dissect_tipc_int_prot_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tipc_tr
|
|||
{
|
||||
guint8 msg_type;
|
||||
tvbuff_t *data_tvb;
|
||||
guint16 message_count;
|
||||
guint32 msg_in_bundle_size;
|
||||
guint32 dword;
|
||||
guint msg_no = 0;
|
||||
|
@ -1831,7 +1830,6 @@ dissect_tipc_int_prot_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tipc_tr
|
|||
proto_tree_add_item(tipc_tree, hf_tipc_link_selector, tvb, offset, 4, FALSE);
|
||||
/* Message count */
|
||||
if (user == TIPC_MSG_BUNDLER || user == TIPC_CHANGEOVER_PROTOCOL) {
|
||||
message_count = tvb_get_ntohs(tvb, offset+2);
|
||||
proto_tree_add_item(tipc_tree, hf_tipc_msg_cnt, tvb, offset, 4, FALSE);
|
||||
}
|
||||
/* Unused */
|
||||
|
|
|
@ -507,9 +507,8 @@ static const value_string tei_draft_status_values[] = {
|
|||
static void
|
||||
dissect_draft_tei_status_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
gint length, offset;
|
||||
gint offset;
|
||||
offset = tvb_get_ntohs(parameter_tvb, TEI_STATUS_LENGTH_OFFSET) + 8;
|
||||
length = msg_length - offset;
|
||||
if(tvb_length_remaining(parameter_tvb, offset) > 0 ){
|
||||
proto_tree_add_item(parameter_tree, hf_tei_draft_status, parameter_tvb, offset, TEI_STATUS_LENGTH, FALSE);
|
||||
proto_item_append_text(parameter_item, " (%s)",
|
||||
|
@ -649,27 +648,13 @@ dissect_integer_range_interface_identifier_parameter(tvbuff_t *parameter_tvb, pr
|
|||
static void
|
||||
dissect_layer3_message(tvbuff_t *layer3_data_tvb, proto_tree *v5ua_tree,proto_item *parameter_item, packet_info *pinfo)
|
||||
{
|
||||
guint16 discriminator_offset, address_offset, low_address_offset, msg_type_offset, info_element_offset;
|
||||
|
||||
|
||||
guint32 all_address_offset;
|
||||
guint16 discriminator_offset;
|
||||
|
||||
if(iua_version == DRAFT){
|
||||
discriminator_offset = DISCRIMINATOR_OFFSET;
|
||||
address_offset = ADDRESS_OFFSET;
|
||||
low_address_offset = LOW_ADDRESS_OFFSET;
|
||||
msg_type_offset = MSG_TYPE_OFFSET;
|
||||
info_element_offset = INFO_ELEMENT_OFFSET;
|
||||
}
|
||||
else{
|
||||
discriminator_offset = DISCRIMINATOR_OFFSET + PARAMETER_HEADER_LENGTH;
|
||||
address_offset = ADDRESS_OFFSET + PARAMETER_HEADER_LENGTH;
|
||||
low_address_offset = LOW_ADDRESS_OFFSET + PARAMETER_HEADER_LENGTH;
|
||||
|
||||
all_address_offset = address_offset;
|
||||
|
||||
msg_type_offset = MSG_TYPE_OFFSET + PARAMETER_HEADER_LENGTH;
|
||||
info_element_offset = INFO_ELEMENT_OFFSET + PARAMETER_HEADER_LENGTH;
|
||||
}
|
||||
|
||||
if (tvb_get_guint8(layer3_data_tvb, discriminator_offset) == 0x48){
|
||||
|
|
|
@ -322,7 +322,6 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int offset = 0;
|
||||
|
||||
char pdut;
|
||||
char pdu_msg_type;
|
||||
guint count = 0;
|
||||
guint offset_wtls = 0;
|
||||
|
||||
|
@ -414,7 +413,6 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ti = proto_tree_add_item(wtls_rec_tree, hf_wtls_alert, tvb, offset,
|
||||
count, bo_little_endian);
|
||||
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
|
||||
pdu_msg_type = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_alert_level,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
offset+=1;
|
||||
|
@ -485,7 +483,6 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
guint value = 0;
|
||||
int size = 0;
|
||||
guint public_key = 0;
|
||||
guint signature = 0;
|
||||
char valStr[1024];
|
||||
const char *valBulk = NULL;
|
||||
const char *valMac = NULL;
|
||||
|
@ -930,7 +927,6 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
bo_little_endian);
|
||||
offset++;
|
||||
client_size++;
|
||||
signature = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_signature_type,
|
||||
tvb, offset,1,
|
||||
|
|
|
@ -322,7 +322,7 @@ static gint ett_xtp_diag = -1;
|
|||
static int
|
||||
dissect_xtp_aseg(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
|
||||
guint32 len = tvb_length_remaining(tvb, offset);
|
||||
guint32 start = offset, start2;
|
||||
guint32 start = offset;
|
||||
proto_item *ti, *ti2, *top_ti;
|
||||
proto_tree *xtp_subtree;
|
||||
struct xtp_ip_addr_seg aseg[1];
|
||||
|
@ -395,7 +395,6 @@ dissect_xtp_aseg(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
|
|||
return (offset - start);
|
||||
|
||||
/** parse and display each address fileds */
|
||||
start2 = offset;
|
||||
switch (aseg->aformat) {
|
||||
case 0:
|
||||
/* address(4) */
|
||||
|
@ -518,7 +517,7 @@ dissect_xtp_traffic_cntl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
static int
|
||||
dissect_xtp_tspec(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
|
||||
guint32 len = tvb_length_remaining(tvb, offset);
|
||||
guint32 start = offset, start2;
|
||||
guint32 start = offset;
|
||||
proto_item *ti, *ti2;
|
||||
proto_tree *xtp_subtree;
|
||||
struct xtp_traffic_spec1 tspec[1];
|
||||
|
@ -590,7 +589,6 @@ dissect_xtp_tspec(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
|
|||
return (offset - start);
|
||||
|
||||
/** parse and display each traffic fields **/
|
||||
start2 = offset;
|
||||
switch (tspec->tformat) {
|
||||
case 0:
|
||||
/* traffic(4) */
|
||||
|
|
Loading…
Reference in New Issue