aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-07-09 01:49:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-07-09 01:49:02 +0000
commit1ae38887b67ecf14e4c36ca9817d2941b3b73f7b (patch)
tree920207458218bb459f3c76cf7b07552ffde4bb45
parent0696f30690862679b09ae85a5fc4414d86089630 (diff)
From Evan Huus:
Grab-bag of unused variables. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7452 svn path=/trunk/; revision=43616
-rw-r--r--epan/dissectors/packet-rdp.c12
-rw-r--r--epan/emem.c4
-rw-r--r--mkcap.c7
-rw-r--r--plugins/mate/packet-mate.c6
-rw-r--r--ui/gtk/airpcap_dlg.c8
-rw-r--r--ui/gtk/main_welcome.c1
-rw-r--r--wiretap/vwr.c7
7 files changed, 4 insertions, 41 deletions
diff --git a/epan/dissectors/packet-rdp.c b/epan/dissectors/packet-rdp.c
index ca8d6ba7b2..de5932aa26 100644
--- a/epan/dissectors/packet-rdp.c
+++ b/epan/dissectors/packet-rdp.c
@@ -1413,17 +1413,7 @@ dissect_rdp_SendData(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
{hf_rdp_pduSource, 2, NULL, 0, 0, NULL },
FI_TERMINATOR
};
-#ifdef RDPELE
- rdp_field_info_t license_fields[] = {
- {hf_rdp_serverRandom, 2, NULL, 0, 0, NULL },
- {hf_rdp_dwVersion, 4, NULL, 0, 0, NULL },
- {hf_rdp_cbCompanyName, 4, &cbCompanyName, 0, 0, NULL },
- {hf_rdp_pbCompanyName, 0, &cbCompanyName, 0, RDP_FI_UNICODE, NULL },
- {hf_rdp_cbProductId, 4, &cbProductId, 0, 0, NULL },
- {hf_rdp_pbProductId, 0, &cbProductId, 0, RDP_FI_UNICODE, NULL },
- FI_TERMINATOR
- };
-#endif
+
length = tvb_length_remaining(tvb, offset);
tree = dissect_rdp(tvb, pinfo, tree);
diff --git a/epan/emem.c b/epan/emem.c
index 1e4b23b2f0..a9e8d353ee 100644
--- a/epan/emem.c
+++ b/epan/emem.c
@@ -380,7 +380,6 @@ print_alloc_stats()
guint num_allocs = 0;
guint total_used = 0;
guint total_allocation = 0;
- guint total_free = 0;
guint used_for_canaries = 0;
guint total_headers;
guint i;
@@ -408,7 +407,6 @@ print_alloc_stats()
num_chunks++;
total_used += (chunk->amount_free_init - chunk->amount_free);
total_allocation += chunk->amount_free_init;
- total_free += chunk->amount_free;
}
if (num_chunks > 0) {
fprintf (stderr, "\n");
@@ -431,7 +429,6 @@ print_alloc_stats()
num_allocs = 0;
total_used = 0;
total_allocation = 0;
- total_free = 0;
used_for_canaries = 0;
}
@@ -458,7 +455,6 @@ print_alloc_stats()
num_chunks++;
total_used += (chunk->amount_free_init - chunk->amount_free);
total_allocation += chunk->amount_free_init;
- total_free += chunk->amount_free;
if (se_packet_mem.debug_use_canary){
void *ptr = chunk->canary_last;
diff --git a/mkcap.c b/mkcap.c
index 74eff6d5f0..f3bc42e69c 100644
--- a/mkcap.c
+++ b/mkcap.c
@@ -320,10 +320,9 @@ gen_next_ack(int force, int spacing)
void
makeackedrun(int len, int spacing, int ackdelay)
{
- int old_seq1, next_ack_ts=0;
+ int next_ack_ts=0;
if (verbose) fprintf(stderr, "makeackedrun: Len=%d, spacing=%d, ackdelay=%d\n",
len, spacing, ackdelay);
- old_seq1=seq_1;
while(len>0){
/*
@@ -456,7 +455,6 @@ makeackedrundroppedtail8kb(int len, int spacing, int ackdelay)
if(num_dupes<3){
int seglen;
- int new_seq;
ts+=1000000;
seglen=((seq_1-dropped_tail)>1460)?1460:(seq_1-dropped_tail);
if(seglen==1460){
@@ -466,7 +464,6 @@ makeackedrundroppedtail8kb(int len, int spacing, int ackdelay)
}
ts+=ackdelay;
- new_seq=seglen+seq_1;
makeseg(eth_2, eth_1, ip_2, ip_1, port_2, port_1, &seq_2, &seq_1, "10", 0);
ts+=spacing;
return;
@@ -528,7 +525,7 @@ all_digits(char *str)
void
process_drop_list(char *drop_list)
{
- int commas=0, i;
+ int commas=0;
char *tok, *save;
if (!drop_list || !(*drop_list)) {
diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c
index 4d724186ac..37f4baed1c 100644
--- a/plugins/mate/packet-mate.c
+++ b/plugins/mate/packet-mate.c
@@ -119,12 +119,6 @@ static void mate_gog_tree(proto_tree* tree, tvbuff_t *tvb, mate_gog* gog, mate_g
proto_tree *gog_gop_tree;
mate_pdu* pdu;
-#ifdef _MATE_DEBUGGING
- proto_item* gog_key_item;
- proto_tree* gog_key_tree;
- guint i;
-#endif
-
gog_item = proto_tree_add_uint(tree,gog->cfg->hfid,tvb,0,0,gog->id);
gog_tree = proto_item_add_subtree(gog_item,gog->cfg->ett);
diff --git a/ui/gtk/airpcap_dlg.c b/ui/gtk/airpcap_dlg.c
index ff51ab4c39..30fa398043 100644
--- a/ui/gtk/airpcap_dlg.c
+++ b/ui/gtk/airpcap_dlg.c
@@ -2404,7 +2404,6 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data)
guint n_wireshark_keys = 0;
guint n_driver_keys = 0;
guint n_curr_adapter_keys = 0;
- guint n_total_keys = 0;
guint i = 0;
GList* wireshark_keys=NULL;
@@ -2424,14 +2423,12 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data)
/* Retrieve Wireshark keys */
wireshark_keys = get_wireshark_keys();
n_wireshark_keys = g_list_length(wireshark_keys);
- n_total_keys += n_wireshark_keys;
merged_list = merge_key_list(wireshark_keys,NULL);
/* Retrieve AirPcap driver's keys */
driver_keys = get_airpcap_driver_keys();
n_driver_keys = g_list_length(driver_keys);
- n_total_keys += n_driver_keys;
merged_list = merge_key_list(merged_list,driver_keys);
@@ -2446,7 +2443,6 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data)
merged_list = merge_key_list(merged_list_tmp,current_adapter_keys);
free_key_list(merged_list_tmp);
- n_total_keys += n_curr_adapter_keys;
}
/* Set up this new list as default for Wireshark and Adapters... */
@@ -2525,7 +2521,6 @@ on_import_bt_clicked (GtkWidget* button _U_, gpointer user_data)
guint n_wireshark_keys = 0;
guint n_driver_keys = 0;
guint n_curr_adapter_keys = 0;
- guint n_total_keys = 0;
guint i = 0;
GList* wireshark_keys=NULL;
@@ -2544,12 +2539,10 @@ on_import_bt_clicked (GtkWidget* button _U_, gpointer user_data)
wireshark_keys = get_wireshark_keys();
n_wireshark_keys = g_list_length(wireshark_keys);
- n_total_keys += n_wireshark_keys;
/* Retrieve AirPcap driver's keys */
driver_keys = get_airpcap_driver_keys();
n_driver_keys = g_list_length(driver_keys);
- n_total_keys += n_driver_keys;
merged_list = merge_key_list(merged_list,driver_keys);
@@ -2564,7 +2557,6 @@ on_import_bt_clicked (GtkWidget* button _U_, gpointer user_data)
merged_list = merge_key_list(merged_list_tmp,current_adapter_keys);
free_key_list(merged_list_tmp);
- n_total_keys += n_curr_adapter_keys;
}
/* Set up this new list as default for Wireshark and Adapters... */
diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c
index 9f2af01215..386fba9ef5 100644
--- a/ui/gtk/main_welcome.c
+++ b/ui/gtk/main_welcome.c
@@ -1205,7 +1205,6 @@ welcome_new(void)
GtkWidget *file_child_box;
#ifdef _WIN32
DWORD chimney_enabled = 0;
- DWORD ce_size = sizeof(chimney_enabled);
#endif
/* prepare colors */
#if 0
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index fa318ac53b..30b699c52b 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -808,12 +808,11 @@ static gboolean vwr_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_head
static gboolean vwr_read_rec_header(vwr_t *vwr, FILE_T fh, int *rec_size, int *IS_TX, int *err, gchar **err_info)
{
- int bytes_read, file_off;
+ int bytes_read;
int f_len, v_type;
guint8 header[16];
errno = WTAP_ERR_CANT_READ;
- file_off = 0;
*rec_size = 0;
/* read out the file data in 16-byte messages, stopping either after we find a frame, */
@@ -826,8 +825,6 @@ static gboolean vwr_read_rec_header(vwr_t *vwr, FILE_T fh, int *rec_size, int *I
*err = file_error(fh, err_info);
return(FALSE);
}
- else
- file_off += bytes_read;
/* got a header; invoke decode-message function to parse and process it */
/* if the function returns a length, then a frame or variable-length message */
@@ -842,8 +839,6 @@ static gboolean vwr_read_rec_header(vwr_t *vwr, FILE_T fh, int *rec_size, int *I
else if (v_type != VT_FRAME) {
if (file_seek(fh, f_len, SEEK_CUR, err) < 0)
return(FALSE);
- else
- file_off += f_len;
}
else {
*rec_size = f_len;