forked from osmocom/wireshark
Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000
svn path=/trunk/; revision=37371
This commit is contained in:
parent
d6fb7f50df
commit
058fc19f45
|
@ -50,7 +50,6 @@ static int hf_fcgi_end_request_protocol_status = -1;
|
|||
|
||||
static int ett_fcgi = -1;
|
||||
static int ett_fcgi_begin_request = -1;
|
||||
static int ett_fcgi_abort_request = -1;
|
||||
static int ett_fcgi_end_request = -1;
|
||||
static int ett_fcgi_params = -1;
|
||||
|
||||
|
@ -166,11 +165,7 @@ dissect_begin_request(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16
|
|||
static void
|
||||
dissect_abort_request(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
|
||||
{
|
||||
proto_item *ar;
|
||||
proto_tree *ar_tree;
|
||||
|
||||
ar = proto_tree_add_text(fcgi_tree, tvb, offset, len, "Abort Request:");
|
||||
ar_tree = proto_item_add_subtree(ar, ett_fcgi_abort_request);
|
||||
proto_tree_add_text(fcgi_tree, tvb, offset, len, "Abort Request:");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -384,7 +379,6 @@ proto_register_fcgi(void)
|
|||
static gint *ett[] = {
|
||||
&ett_fcgi,
|
||||
&ett_fcgi_begin_request,
|
||||
&ett_fcgi_abort_request,
|
||||
&ett_fcgi_end_request,
|
||||
&ett_fcgi_params
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <epan/packet.h>
|
||||
#include <epan/proto.h>
|
||||
|
@ -53,7 +53,6 @@ static gint ett_lrh = -1;
|
|||
static gint ett_grh = -1;
|
||||
static gint ett_bth = -1;
|
||||
static gint ett_rwh = -1;
|
||||
static gint ett_rawdata = -1;
|
||||
static gint ett_rdeth = -1;
|
||||
static gint ett_deth = -1;
|
||||
static gint ett_reth = -1;
|
||||
|
@ -1608,7 +1607,6 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
|
|||
proto_item *base_transport_header_item = NULL;
|
||||
|
||||
/* Raw Data */
|
||||
proto_tree *RAWDATA_header_tree;
|
||||
proto_item *RAWDATA_header_item;
|
||||
guint8 lnh_val = 0; /* Link Next Header Value */
|
||||
gint offset = 0; /* Current Offset */
|
||||
|
@ -1823,7 +1821,6 @@ skip_lrh:
|
|||
/* Unknown Packet */
|
||||
RAWDATA_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_raw_data, tvb, offset, -1, FALSE);
|
||||
proto_item_set_text(RAWDATA_header_item, "%s", "Unknown Raw Data - IB Encapsulated");
|
||||
RAWDATA_header_tree = proto_item_add_subtree(RAWDATA_header_item, ett_rawdata);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -7319,7 +7316,6 @@ void proto_register_infiniband(void)
|
|||
&ett_grh,
|
||||
&ett_bth,
|
||||
&ett_rwh,
|
||||
&ett_rawdata,
|
||||
&ett_rdeth,
|
||||
&ett_deth,
|
||||
&ett_reth,
|
||||
|
|
|
@ -301,7 +301,6 @@ static gint hf_krb_midl_hdr_len = -1;
|
|||
static gint ett_krb_kerberos = -1;
|
||||
static gint ett_krb_TransitedEncoding = -1;
|
||||
static gint ett_krb_PAC_LOGON_INFO = -1;
|
||||
static gint ett_krb_PAC_CREDENTIAL_TYPE = -1;
|
||||
static gint ett_krb_PAC_SERVER_CHECKSUM = -1;
|
||||
static gint ett_krb_PAC_PRIVSVR_CHECKSUM = -1;
|
||||
static gint ett_krb_PAC_CLIENT_INFO_TYPE = -1;
|
||||
|
@ -2749,13 +2748,7 @@ dissect_krb5_PAC_UPN_DNS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset
|
|||
static int
|
||||
dissect_krb5_PAC_CREDENTIAL_TYPE(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_)
|
||||
{
|
||||
proto_item *item=NULL;
|
||||
proto_tree *tree=NULL;
|
||||
|
||||
item=proto_tree_add_item(parent_tree, hf_krb_PAC_CREDENTIAL_TYPE, tvb, offset, tvb_length_remaining(tvb, offset), FALSE);
|
||||
if(parent_tree){
|
||||
tree=proto_item_add_subtree(item, ett_krb_PAC_CREDENTIAL_TYPE);
|
||||
}
|
||||
proto_tree_add_item(parent_tree, hf_krb_PAC_CREDENTIAL_TYPE, tvb, offset, tvb_length_remaining(tvb, offset), FALSE);
|
||||
|
||||
/*qqq*/
|
||||
return offset;
|
||||
|
@ -5407,7 +5400,6 @@ proto_register_kerberos(void)
|
|||
&ett_krb_TransitedEncoding,
|
||||
&ett_krb_PAC,
|
||||
&ett_krb_PAC_LOGON_INFO,
|
||||
&ett_krb_PAC_CREDENTIAL_TYPE,
|
||||
&ett_krb_PAC_SERVER_CHECKSUM,
|
||||
&ett_krb_PAC_PRIVSVR_CHECKSUM,
|
||||
&ett_krb_PAC_CLIENT_INFO_TYPE,
|
||||
|
|
|
@ -1877,13 +1877,13 @@ static int
|
|||
dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
|
||||
{
|
||||
proto_item* lock_item = NULL;
|
||||
proto_tree* lock_tree = NULL;
|
||||
/* proto_tree* lock_tree = NULL; */
|
||||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nispluscb_entry,
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry);
|
||||
/* lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry); */
|
||||
|
||||
/*XXXXX Not implemented yet*/
|
||||
|
||||
|
|
|
@ -160,6 +160,12 @@ nlsp_dissect_unknown(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
* a matching code. If found, we add to the display tree and
|
||||
* then call the dissector. If it is not, we just post an
|
||||
* "unknown" clv entry using the passed in unknown clv tree id.
|
||||
* XXX: The "unknown tree id" is an 'ett' index for use
|
||||
* when creating a subtree;
|
||||
* Since the 'unknown' subtree was not actually used in the
|
||||
* code below, what was the intention for this ?
|
||||
* For now: code related to creating an 'unknown' subtrree
|
||||
* disabled.
|
||||
*
|
||||
* Input:
|
||||
* tvbuff_t * : tvbuffer for packet data
|
||||
|
@ -175,7 +181,7 @@ nlsp_dissect_unknown(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
*/
|
||||
static void
|
||||
nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
|
||||
const nlsp_clv_handle_t *opts, int len, int unknown_tree_id)
|
||||
const nlsp_clv_handle_t *opts, int len, int unknown_tree_id _U_)
|
||||
{
|
||||
guint8 code;
|
||||
guint8 length;
|
||||
|
@ -221,10 +227,12 @@ nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
ti = proto_tree_add_text(tree, tvb, offset - 2,
|
||||
length + 2, "Unknown code %u (%u)",
|
||||
code, length);
|
||||
#if 0 /* XXX: ?? */
|
||||
clv_tree = proto_item_add_subtree(ti,
|
||||
unknown_tree_id );
|
||||
} else {
|
||||
clv_tree = NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
offset += length;
|
||||
|
|
|
@ -165,12 +165,12 @@ static const value_string format_vals[] = {
|
|||
static void
|
||||
dissect_pgsql(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
conversation_t *cv;
|
||||
/* conversation_t *cv; */
|
||||
|
||||
first_message = TRUE;
|
||||
|
||||
/* We don't use conversation data yet, but... */
|
||||
cv = find_or_create_conversation(pinfo);
|
||||
/* cv = find_or_create_conversation(pinfo); */
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PGSQL");
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
|
|
|
@ -305,7 +305,6 @@ static int hf_xtp_diag_msg = -1;
|
|||
|
||||
/* Initialize the subtree pointers */
|
||||
static gint ett_xtp = -1;
|
||||
static gint ett_xtp_key = -1;
|
||||
static gint ett_xtp_cmd = -1;
|
||||
static gint ett_xtp_cmd_options = -1;
|
||||
static gint ett_xtp_cmd_ptype = -1;
|
||||
|
@ -1007,7 +1006,6 @@ dissect_xtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
offset = 0;
|
||||
ti = proto_tree_add_uint64(xtp_tree, hf_xtp_key,
|
||||
tvb, offset, 8, xtph->key);
|
||||
xtp_subtree = proto_item_add_subtree(ti, ett_xtp_key);
|
||||
offset += 8;
|
||||
/* cmd(4) */
|
||||
ti = proto_tree_add_uint(xtp_tree, hf_xtp_cmd,
|
||||
|
@ -1411,7 +1409,6 @@ proto_register_xtp(void)
|
|||
|
||||
static gint *ett[] = {
|
||||
&ett_xtp,
|
||||
&ett_xtp_key,
|
||||
&ett_xtp_cmd,
|
||||
&ett_xtp_cmd_options,
|
||||
&ett_xtp_cmd_ptype,
|
||||
|
|
Loading…
Reference in New Issue