aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-21 02:01:06 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-21 02:01:06 +0000
commit60fe401dc7a1d0f1d11f0e1f4e7b1cd29d5e7f5d (patch)
tree3406b514e1c09bdc54bfc77913edb0688d160265
parent10da28737f65d468bb2d6d69005ee926f771e06f (diff)
Get rid of some unused variables.
svn path=/trunk/; revision=4241
-rw-r--r--packet-diameter.c7
-rw-r--r--packet-ftp.c4
-rw-r--r--packet-gnutella.c7
-rw-r--r--packet-gtp.c7
-rw-r--r--packet-icap.c1
-rw-r--r--packet-mip.c7
-rw-r--r--packet-nbns.c5
-rw-r--r--packet-ospf.c14
-rw-r--r--packet-pgm.c5
-rw-r--r--packet-ppp.c4
-rw-r--r--packet-smb-pipe.c9
-rw-r--r--packet-smb.c33
12 files changed, 27 insertions, 76 deletions
diff --git a/packet-diameter.c b/packet-diameter.c
index 5bf3caeb72..3b3201ffa6 100644
--- a/packet-diameter.c
+++ b/packet-diameter.c
@@ -1,7 +1,7 @@
/* packet-diameter.c
* Routines for Diameter packet disassembly
*
- * $Id: packet-diameter.c,v 1.33 2001/11/04 02:50:19 guy Exp $
+ * $Id: packet-diameter.c,v 1.34 2001/11/21 02:01:06 guy Exp $
*
* Copyright (c) 2001 by David Frascone <dave@frascone.com>
*
@@ -335,7 +335,6 @@ addStaticAVP(int code, gchar *name, diameterDataType type, value_string *values)
/* Parse our values array, if we have one */
if (values) {
for (i=0; values[i].strptr != NULL; i++) {
- char *valueName=NULL, *valueCode=NULL;
ValueName *ve = NULL;
ve = g_malloc(sizeof(ValueName));
@@ -510,7 +509,6 @@ addCommand(int code, char *name, char *vendorId)
static int
xmlParseCommand(xmlDocPtr doc, xmlNodePtr cur)
{
- guint32 vendorId = 0;
char *name, *code, *vendorIdString;
/*
@@ -1271,7 +1269,6 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
size_t offset = 0 ;
char dataBuffer[4096];
tvbuff_t *group_tvb;
- tvbuff_t *mip_tvb;
proto_tree *group_tree;
proto_item *grouptf;
proto_item *avptf;
@@ -1584,8 +1581,6 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
}
break;
case DIAMETER_MIP_REG_REQ:
-
- /* Make a new tvb */
safe_dissect_mip(tvb, pinfo, avpi_tree, offset, avpDataLength);
break;
diff --git a/packet-ftp.c b/packet-ftp.c
index faf962758c..a2119e1d86 100644
--- a/packet-ftp.c
+++ b/packet-ftp.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* Copyright 2001, Juan Toledo <toledo@users.sourceforge.net> (Passive FTP)
*
- * $Id: packet-ftp.c,v 1.35 2001/09/03 20:52:25 guy Exp $
+ * $Id: packet-ftp.c,v 1.36 2001/11/21 02:01:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -119,7 +119,7 @@ static void
handle_pasv_response(const u_char *line, int linelen, packet_info *pinfo)
{
char *args;
- char *p, *endp;
+ char *p;
u_char c;
int i;
int address[4], port[2];
diff --git a/packet-gnutella.c b/packet-gnutella.c
index dba10d9e09..036a0d9e00 100644
--- a/packet-gnutella.c
+++ b/packet-gnutella.c
@@ -2,7 +2,7 @@
* Routines for gnutella dissection
* Copyright 2001, B. Johannessen <bob@havoq.com>
*
- * $Id: packet-gnutella.c,v 1.7 2001/10/26 18:28:16 gram Exp $
+ * $Id: packet-gnutella.c,v 1.8 2001/11/21 02:01:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -176,13 +176,12 @@ static void dissect_gnutella_queryhit(tvbuff_t *tvb, guint offset, proto_tree *t
proto_tree *qhi, *hit_tree;
int hit_count, i;
- int hit_offset, idx, hit_size;
+ int hit_offset;
int name_length, extra_length;
int idx_at_offset, size_at_offset;
int servent_id_at_offset;
int name_at_offset, extra_at_offset;
int cur_char, remaining, used;
- unsigned long ip;
if(offset + size > tvb_length(tvb)) {
proto_tree_add_item(tree,
@@ -194,7 +193,7 @@ static void dissect_gnutella_queryhit(tvbuff_t *tvb, guint offset, proto_tree *t
return;
}
- hit_count = tvb_get_guint8(tvb, offset + GNUTELLA_QUERYHIT_COUNT_OFFSET);
+ hit_count = tvb_get_guint8(tvb, offset + GNUTELLA_QUERYHIT_COUNT_OFFSET);
proto_tree_add_uint(tree,
hf_gnutella_queryhit_count,
diff --git a/packet-gtp.c b/packet-gtp.c
index e126b05419..5991f7b400 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
- * $Id: packet-gtp.c,v 1.15 2001/11/20 22:29:04 guy Exp $
+ * $Id: packet-gtp.c,v 1.16 2001/11/21 02:01:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3475,7 +3475,7 @@ decode_gtp_pdp_cntxt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
guint8 ggsn_addr_len, apn_len, trans_id, vaa, order, nsapi, sapi, pdu_send_no, pdu_rec_no, pdp_cntxt_id,
pdp_type_org, pdp_type_num, pdp_addr_len;
- guint16 length, l_offset, sn_down, sn_up, up_flow;
+ guint16 length, sn_down, sn_up, up_flow;
guint32 addr_ipv4, up_teid, up_teid_cp;
struct e_in6_addr addr_ipv6;
proto_tree *ext_tree_pdp;
@@ -3621,8 +3621,7 @@ decode_gtp_pdp_cntxt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
static int
decode_gtp_apn(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
- guint16 length, name_len, tmp;
- gchar *apn;
+ guint16 length;
proto_tree *ext_tree_apn;
proto_item *te;
diff --git a/packet-icap.c b/packet-icap.c
index b544787cbe..c7fbc56449 100644
--- a/packet-icap.c
+++ b/packet-icap.c
@@ -224,7 +224,6 @@ is_icap_header:
datalen = tvb_length_remaining(tvb, offset);
if (datalen > 0) {
- tvbuff_t *next_tvb = tvb_new_subset(tvb, offset, -1, -1);
dissect_data(tvb, offset, pinfo, icap_tree);
}
}
diff --git a/packet-mip.c b/packet-mip.c
index d4b3886698..cae0135bc5 100644
--- a/packet-mip.c
+++ b/packet-mip.c
@@ -2,7 +2,7 @@
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <sraab@cisco.com>
*
- * $Id: packet-mip.c,v 1.21 2001/10/31 22:16:25 guy Exp $
+ * $Id: packet-mip.c,v 1.22 2001/11/21 02:01:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -177,7 +177,6 @@ dissect_mip_extensions( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 ext_subtype=0;
size_t offset = 0;
gchar ext_data[256];
- gchar *eString;
size_t dataLength;
size_t hdrLen;
@@ -287,10 +286,10 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *mip_tree=NULL;
proto_item *tf;
proto_tree *flags_tree;
- guint8 type, code;
+ guint8 type;
guint8 flags;
nstime_t ident_time;
- size_t offset=0, eoffset;
+ size_t offset=0;
tvbuff_t *extensions_tvb;
size_t dataRemaining;
diff --git a/packet-nbns.c b/packet-nbns.c
index 85835281b7..1c7647b74a 100644
--- a/packet-nbns.c
+++ b/packet-nbns.c
@@ -3,7 +3,7 @@
* to when it had only NBNS)
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nbns.c,v 1.64 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-nbns.c,v 1.65 2001/11/21 02:01:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1154,7 +1154,6 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *nbdgm_tree = NULL;
proto_item *ti = NULL;
struct nbdgm_header header;
- int msglen;
int flags;
int message_index;
tvbuff_t *next_tvb;
@@ -1276,6 +1275,8 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Here we can pass the packet off to the next protocol.
* Set the length of our top-level tree item to include
* only our stuff.
+ *
+ * XXX - take the datagram length into account?
*/
proto_item_set_len(ti, offset);
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
diff --git a/packet-ospf.c b/packet-ospf.c
index 04653c3690..a211f50462 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.47 2001/10/27 00:47:26 guy Exp $
+ * $Id: packet-ospf.c,v 1.48 2001/11/21 02:01:05 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -1178,33 +1178,22 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
guint16 ls_type;
guint16 ls_length;
int end_offset;
- guint8 nr_links;
- guint16 nr_tos;
guint8 reserved;
/* router LSA */
guint8 link_type;
- guint16 link_counter;
- guint8 tos_counter;
char *link_type_str;
guint32 metric;
guint8 router_lsa_flags;
char router_lsa_flags_string[5];
- /* AS-external LSA */
- guint8 options;
-
- /* opaque LSA */
- guint8 ls_id_type;
-
guint8 router_priority;
guint32 number_prefixes;
guint8 prefix_length;
guint16 reserved16;
guint16 referenced_ls_type;
- char *referenced_ls_type_str;
guint8 flags;
guint8 flags_string[4];
@@ -1230,7 +1219,6 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
proto_tree_add_text(ospf_lsa_tree, tvb, offset + 2, 2, "LSA Type: 0x%04x (%s)",
ls_type, val_to_str(ls_type, v3_ls_type_vals,"Unkown"));
- ls_id_type = 0;
proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 4, "Link State ID: %s",
ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
diff --git a/packet-pgm.c b/packet-pgm.c
index fed0a975d0..130169916e 100644
--- a/packet-pgm.c
+++ b/packet-pgm.c
@@ -1,7 +1,7 @@
/* packet-pgm.c
* Routines for pgm packet disassembly
*
- * $Id: packet-pgm.c,v 1.7 2001/08/06 19:05:14 guy Exp $
+ * $Id: packet-pgm.c,v 1.8 2001/11/21 02:01:05 guy Exp $
*
* Copyright (c) 2000 by Talarian Corp
*
@@ -111,7 +111,6 @@ static int hf_pgm_opt_type = -1;
static int hf_pgm_opt_len = -1;
static int hf_pgm_opt_tlen = -1;
-static int hf_pgm_genopt = -1;
static int hf_pgm_genopt_type = -1;
static int hf_pgm_genopt_len = -1;
static int hf_pgm_genopt_opx = -1;
@@ -774,8 +773,6 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case PGM_RDATA_PCKT:
case PGM_ODATA_PCKT: {
- tvbuff_t *next_tvb;
-
type_tree = proto_item_add_subtree(tf, ett_pgm_data);
proto_tree_add_uint(type_tree, hf_pgm_spm_sqn, tvb,
diff --git a/packet-ppp.c b/packet-ppp.c
index 2497c3986f..9e376a73d3 100644
--- a/packet-ppp.c
+++ b/packet-ppp.c
@@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
- * $Id: packet-ppp.c,v 1.75 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-ppp.c,v 1.76 2001/11/21 02:01:04 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1969,8 +1969,6 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_tree *field_tree;
proto_item *tv;
proto_tree *value_tree;
- proto_item *tm;
- proto_tree *message_tree;
guint8 code, id, value_size;
guint16 length;
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c
index fc4547e0d6..6d4c39601b 100644
--- a/packet-smb-pipe.c
+++ b/packet-smb-pipe.c
@@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
* Guy Harris 2001
*
- * $Id: packet-smb-pipe.c,v 1.51 2001/11/20 09:07:31 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.52 2001/11/21 02:01:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1233,7 +1233,7 @@ find_lanman(int lanman_num)
static const guchar *
get_count(const guchar *desc, int *countp)
{
- int count = 0, off = 0;
+ int count = 0;
guchar c;
if (!isdigit(*desc)) {
@@ -1978,11 +1978,9 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
gboolean has_data;
gboolean has_ent_count;
guint16 ent_count, aux_count;
- guint i, j;
+ guint i;
proto_item *data_item;
proto_tree *data_tree;
- proto_item *entry_item;
- proto_tree *entry_tree;
if (!proto_is_protocol_enabled(proto_smb_lanman))
return FALSE;
@@ -2609,7 +2607,6 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
int offset;
int function;
int fid = -1;
- int len;
guint16 info_level;
if (!proto_is_protocol_enabled(proto_smb_pipe))
diff --git a/packet-smb.c b/packet-smb.c
index 69712aece2..f5bc9ab3f7 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb.c,v 1.163 2001/11/20 08:18:01 guy Exp $
+ * $Id: packet-smb.c,v 1.164 2001/11/21 02:01:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -507,8 +507,6 @@ static int hf_smb_fs_attr_fc = -1;
static int hf_smb_fs_attr_vq = -1;
static int hf_smb_fs_attr_dim = -1;
static int hf_smb_fs_attr_vic = -1;
-static int hf_smb_setupword1 = -1;
-static int hf_smb_setupword2 = -1;
static gint ett_smb = -1;
static gint ett_smb_hdr = -1;
@@ -1769,7 +1767,6 @@ dissect_negprot_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
while(bc){
int len;
- int old_offset = offset;
const guint8 *str;
proto_item *dit = NULL;
proto_tree *dtr = NULL;
@@ -1997,8 +1994,6 @@ dissect_negprot_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
tvb, offset, dn_len, dn);
COUNT_BYTES(dn_len);
} else {
- int len;
-
/* guid */
/* XXX - show it in the standard Microsoft format
for GUIDs? */
@@ -2691,7 +2686,6 @@ dissect_query_information_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
guint16 bc;
guint8 wc;
- nstime_t ts;
WORD_COUNT;
@@ -3379,7 +3373,6 @@ dissect_read_mpx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
{
guint16 datalen=0, bc;
guint8 wc;
- int tvblen;
WORD_COUNT;
@@ -3490,7 +3483,6 @@ dissect_write_raw_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
guint32 to;
guint16 datalen=0, bc;
guint8 wc;
- int tvblen;
WORD_COUNT;
@@ -3568,7 +3560,6 @@ dissect_write_mpx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
guint32 to;
guint16 datalen=0, bc;
guint8 wc;
- int tvblen;
WORD_COUNT;
@@ -4521,7 +4512,6 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
guint8 wc, cmd=0xff;
guint16 andxoffset=0, bc, datalen=0;
- int len;
WORD_COUNT;
@@ -4665,8 +4655,7 @@ static int
dissect_write_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_tree *smb_tree)
{
guint8 wc, cmd=0xff;
- guint16 andxoffset=0, bc, datalen=0;
- int len;
+ guint16 andxoffset=0, bc;
WORD_COUNT;
@@ -8750,9 +8739,6 @@ dissect_transaction2_request_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree = NULL;
smb_info_t *si;
smb_transact2_info_t *t2i;
- int fn_len;
- const char *fn;
- int old_offset = offset;
si = (smb_info_t *)pinfo->private_data;
t2i = si->sip->extra_info;
@@ -9821,8 +9807,8 @@ static int
dissect_4_3_4_7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
int offset, guint16 *bcp, gboolean *trunc)
{
- int fn_len, sfn_len;
- const char *fn, *sfn;
+ int fn_len;
+ const char *fn;
int old_offset = offset;
proto_item *item = NULL;
proto_tree *tree = NULL;
@@ -10196,8 +10182,6 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree = NULL;
smb_info_t *si;
smb_transact2_info_t *t2i;
- int fn_len;
- const char *fn;
int count;
gboolean trunc;
@@ -10328,8 +10312,7 @@ dissect_transaction2_response_parameters(tvbuff_t *tvb, packet_info *pinfo, prot
smb_info_t *si;
smb_transact2_info_t *t2i;
guint16 fid;
- int fn_len, lno;
- const char *fn;
+ int lno;
int old_offset = offset;
si = (smb_info_t *)pinfo->private_data;
@@ -10512,12 +10495,11 @@ static int
dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_tree *smb_tree)
{
guint8 sc, wc;
- guint16 od=0, tf, po=0, pc=0, pd, dc=0, dd=0;
+ guint16 od=0, po=0, pc=0, pd, dc=0, dd=0;
int so=offset;
int sl=0;
int spo=offset;
int spc=0;
- guint32 to;
smb_info_t *si;
smb_transact2_info_t *t2i = NULL;
guint16 bc;
@@ -11539,7 +11521,6 @@ get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp,
{
static gchar str[3][MAX_UNICODE_STR_LEN+3+1];
static gchar *cur;
- int offset = *offsetp;
const gchar *string;
int string_len;
smb_info_t *si;
@@ -12633,8 +12614,6 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint16 flags2;
smb_info_t si;
smb_saved_info_t *sip = NULL;
- proto_item *cmd_item = NULL;
- proto_tree *cmd_tree = NULL;
guint32 nt_status = 0;
guint8 errclass = 0;
guint16 errcode = 0;