Ethereal-dev: Re: [Ethereal-dev] gcc warnings about unused variables

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Mon, 4 Mar 2002 02:47:34 +0100
Just to add to the previous patch: the attached patch fixes warnings
about unused variables (in contrast to unused parameters) by removing
them. I did not remove the unused functions in tcp_graph.c in case
someone still has use for them. I edited the diff files manually to
not contain the _U_ diffs I sent earlier - I hope I didn't make any
mistakes there.
So as soon as the remaining patches to the toplevel build process
have been applied, the only things remaining should be the packet-*.c
files.

  Ciao
                Jï¿œrg
--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
Changelog: <jmayer@xxxxxxxxx>
	Remove unused variables from gtk/*.c

Index: ethereal/gtk/capture_dlg.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/capture_dlg.c,v
retrieving revision 1.62
diff -u -r1.62 capture_dlg.c
--- capture_dlg.c	2002/02/24 09:25:36	1.62
+++ capture_dlg.c	2002/03/04 01:27:25
@@ -672,7 +672,6 @@
   gchar *if_name;
   gchar *filter_text;
   gchar *save_file;
-  int value;
 
   if_cb     = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(parent_w), E_CAP_IFACE_KEY);
   snap_cb   = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(parent_w), E_CAP_SNAP_CB_KEY);
Index: ethereal/gtk/main.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/main.c,v
retrieving revision 1.237
diff -u -r1.237 main.c
--- main.c	2002/02/24 09:25:36	1.237
+++ main.c	2002/03/04 01:27:32
@@ -759,7 +759,6 @@
 	gboolean        has_blurb = FALSE;
 	guint           length = 0, byte_len;
 	GtkWidget	*byte_view;
-	tvbuff_t	*byte_tvb;
 	const guint8	*byte_data;
 
 	g_assert(node);
Index: ethereal/gtk/packet_win.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/packet_win.c,v
retrieving revision 1.33
diff -u -r1.33 packet_win.c
--- packet_win.c	2002/02/18 01:08:44	1.33
+++ packet_win.c	2002/03/04 01:27:32
@@ -210,7 +210,6 @@
 	gpointer user_data)
 {
 	field_info *finfo;
-	int i;
 	GtkWidget *byte_view;
 	const guint8 *data;
 	guint len;
Index: ethereal/gtk/prefs_dlg.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/prefs_dlg.c,v
retrieving revision 1.42
diff -u -r1.42 prefs_dlg.c
--- prefs_dlg.c	2002/02/14 10:58:49	1.42
+++ prefs_dlg.c	2002/03/04 01:27:33
@@ -585,7 +585,7 @@
     const enum_val_t *enumvals, gint current_val)
 {
 	GtkTooltips *tooltips;
-	GtkWidget *label, *menu_box, *menu, *menu_item, *option_menu;
+	GtkWidget *menu_box, *menu, *menu_item, *option_menu;
 	int menu_index, index;
 	const enum_val_t *enum_valp;
 	GtkWidget *event_box;
@@ -676,14 +676,10 @@
 static void
 pref_fetch(pref_t *pref, gpointer user_data)
 {
-  GtkWidget *label;
-  char *label_string;
   char *str_val;
   char *p;
   guint uval;
   gboolean bval;
-  GSList *rb_entry;
-  GtkWidget *button;
   gint enumval;
   gboolean *pref_changed_p = user_data;
 
Index: ethereal/gtk/proto_draw.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/proto_draw.c,v
retrieving revision 1.46
diff -u -r1.46 proto_draw.c
--- proto_draw.c	2002/02/18 01:08:44	1.46
+++ proto_draw.c	2002/03/04 01:27:34
@@ -81,7 +81,7 @@
 get_notebook_bv_ptr(GtkWidget *nb_ptr)
 {
   int num;
-  GtkWidget *bv_page, *bv;
+  GtkWidget *bv_page;
 
   num = gtk_notebook_get_current_page(GTK_NOTEBOOK(nb_ptr));
   bv_page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(nb_ptr), num);
@@ -890,7 +890,6 @@
 	gchar		*label_ptr;
 	GtkCTreeNode	*parent;
 	gboolean	is_leaf, is_expanded;
-	int		i;
 
 	if (!fi->visible)
 		return;
Index: ethereal/gtk/tcp_graph.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/tcp_graph.c,v
retrieving revision 1.14
diff -u -r1.14 tcp_graph.c
--- tcp_graph.c	2002/01/30 23:08:27	1.14
+++ tcp_graph.c	2002/03/04 01:27:35
@@ -668,7 +668,6 @@
 {
 	GdkColormap *colormap;
 	GdkColor color;
-	GtkWidget *frame, *box;
 #define WINDOW_TITLE_LENGTH 64
 	char window_title[WINDOW_TITLE_LENGTH];