diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-05-23 18:04:45 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-05-23 18:04:45 +0000 |
commit | 058fc19f453cc7445a62036a29bc69938ceb1a2a (patch) | |
tree | b6742a2306673feac9690bef2c9a9b5063bbac53 /epan/dissectors | |
parent | d6fb7f50dfc047183116095a32bd7b7b97f77446 (diff) | |
download | wireshark-058fc19f453cc7445a62036a29bc69938ceb1a2a.tar.gz |
Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000
svn path=/trunk/; revision=37371
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-fcgi.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-infiniband.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-kerberos.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-nisplus.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nlsp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-pgsql.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-xtp.c | 3 |
7 files changed, 16 insertions, 29 deletions
diff --git a/epan/dissectors/packet-fcgi.c b/epan/dissectors/packet-fcgi.c index 2edad61971..1d811373af 100644 --- a/epan/dissectors/packet-fcgi.c +++ b/epan/dissectors/packet-fcgi.c @@ -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 }; diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c index 8cc36d225d..a82c144f5e 100644 --- a/epan/dissectors/packet-infiniband.c +++ b/epan/dissectors/packet-infiniband.c @@ -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, diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 8d4c9f3a64..08a5617b29 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -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, diff --git a/epan/dissectors/packet-nisplus.c b/epan/dissectors/packet-nisplus.c index 5753db545d..97c8540408 100644 --- a/epan/dissectors/packet-nisplus.c +++ b/epan/dissectors/packet-nisplus.c @@ -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*/ diff --git a/epan/dissectors/packet-nlsp.c b/epan/dissectors/packet-nlsp.c index 6697eba73e..8bf00ebffc 100644 --- a/epan/dissectors/packet-nlsp.c +++ b/epan/dissectors/packet-nlsp.c @@ -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; diff --git a/epan/dissectors/packet-pgsql.c b/epan/dissectors/packet-pgsql.c index f595624890..5be51438a5 100644 --- a/epan/dissectors/packet-pgsql.c +++ b/epan/dissectors/packet-pgsql.c @@ -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)) diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c index 8cf34d84fc..f8c5b57e1d 100644 --- a/epan/dissectors/packet-xtp.c +++ b/epan/dissectors/packet-xtp.c @@ -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, |