This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] Fix "-Wall" warnings
- To: Insight Maling List <insight at sources dot redhat dot com>
- Subject: [PATCH] Fix "-Wall" warnings
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Thu, 7 Jun 2001 07:43:03 -0700 (PDT)
Hi,
Silly patch. Fixes all of the -Wall errors on my linux box...
Keith
ChangeLog
2001-06-07 Keith Seitz <keiths@redhat.com>
* generic/gdbtk-hooks.c (x_event): Remove unused variable "count".
(tracepoint_notify): Remove superfluous declaration. This funtion
was moved to gdbtk-bp.c.
* generic/gdbtk-bp.c (gdb_find_bp_at_addr): Remove unused variable
"b".
(gdb_set_bp): Remove unused variable "cmd".
(gdb_set_bp_addr): Remove unused variables "cmd" and "filename".
* generic/gdbtk.c (gdbtk_init): Remove unused variables
"auto_path_name", "auto_path_elem", and "found_main".
Patch
Index: generic/gdbtk-bp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v
retrieving revision 1.5
diff -u -p -r1.5 gdbtk-bp.c
--- gdbtk-bp.c 2001/05/11 20:01:57 1.5
+++ gdbtk-bp.c 2001/06/07 14:42:08
@@ -24,6 +24,7 @@
#include "linespec.h"
#include "breakpoint.h"
#include "tracepoint.h"
+#include "gdb-events.h"
#include <tcl.h>
#include "gdbtk.h"
@@ -199,7 +200,6 @@ gdb_find_bp_at_addr (clientData, interp,
{
int i;
long addr;
- struct breakpoint *b;
if (objc != 2)
{
@@ -419,7 +419,6 @@ gdb_set_bp (clientData, interp, objc, ob
int line, thread = -1;
struct breakpoint *b;
char *buf, *typestr;
- Tcl_DString cmd;
enum bpdisp disp;
if (objc != 4 && objc != 5)
@@ -505,8 +504,7 @@ gdb_set_bp_addr (ClientData clientData,
int thread = -1;
long addr;
struct breakpoint *b;
- char *filename, *typestr, *buf;
- Tcl_DString cmd;
+ char *typestr, *buf;
enum bpdisp disp;
if (objc != 3 && objc != 4)
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.14
diff -u -p -r1.14 gdbtk-hooks.c
--- gdbtk-hooks.c 2001/05/18 22:49:34 1.14
+++ gdbtk-hooks.c 2001/06/07 14:42:08
@@ -100,7 +100,6 @@ static void gdbtk_print_frame_info (stru
static void gdbtk_post_add_symbol (void);
static void gdbtk_register_changed (int regno);
static void gdbtk_memory_changed (CORE_ADDR addr, int len);
-static void tracepoint_notify (struct tracepoint *, const char *);
static void gdbtk_selected_frame_changed (int);
static void gdbtk_context_change (int);
static void gdbtk_error_begin (void);
@@ -436,7 +435,6 @@ x_event (signo)
{
static volatile int in_x_event = 0;
static Tcl_Obj *varname = NULL;
- static int count = 0;
/* Do nor re-enter this code or enter it while collecting gdb output. */
if (in_x_event || in_fputs)
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.14
diff -u -p -r1.14 gdbtk.c
--- gdbtk.c 2001/06/05 22:01:21 1.14
+++ gdbtk.c 2001/06/07 14:42:08
@@ -364,10 +364,7 @@ gdbtk_init (argv0)
char *argv0;
{
struct cleanup *old_chain;
- int found_main;
char *s;
-
- Tcl_Obj *auto_path_elem, *auto_path_name;
/* If there is no DISPLAY environment variable, Tk_Init below will fail,
causing gdb to abort. If instead we simply return here, gdb will