From: Andrew Cagney <cagney@gnu.org>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: [commit] rm unused symtab & sh functions; Was: [obish] -Wunused-function warnings
Date: Sat, 17 Jan 2004 01:04:00 -0000 [thread overview]
Message-ID: <40088A27.7040902@gnu.org> (raw)
In-Reply-To: <16390.57220.51774.395649@localhost.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
> Andrew Cagney writes:
> > Hello,
> >
> > Attached is a list of all the -Wunused-function warnings that I'm
> > seeing. Since all these functions are unreachable (i.e., dead code), I
> > think their removal is pretty obvious.
>
> > src/gdb/dwarf2read.c:615: warning: `dwarf2_unsupported_at_frame_base_complaint' defined but not used
>
> yes
>
> > src/gdb/sh64-tdep.c:835: warning: `sh64_get_gdb_regnum' defined but not used
>
> yes
>
> > src/gdb/stabsread.c:199: warning: `lrs_general_complaint' defined but not used
>
> yes, leftover from live range splitting cleanup.
>
> > src/gdb/stabsread.c:540: warning: `ref_search_value' defined but not used
>
> ditto
>
> > src/gdb/stabsread.c:92: warning: `get_substring' declared `static' but never defined
>
> leftover from cfront cleanup function was deleted but proto is still there.
>
> > src/gdb/symfile.c:208: warning: `compare_symbols' defined but not used
>
> leftover from David's cleanups.
>
> So all ok.
Ya! I've committed the attached.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4816 bytes --]
2004-01-16 Andrew Cagney <cagney@redhat.com>
* symfile.c: Update copyright year.
(compare_symbols): Delete unused function.
* stabsread.c: Update copyright year.
(lrs_general_complaint): Delete unused function.
(ref_search_value): Ditto.
(get_substring): Delete declaration.
* sh64-tdep.c: Update copyright year.
(sh64_get_gdb_regnum): Delete unused function.
* dwarf2read.c (dwarf2_unsupported_at_frame_base_complaint):
Delete unused function.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.120
diff -u -r1.120 dwarf2read.c
--- dwarf2read.c 14 Jan 2004 16:54:41 -0000 1.120
+++ dwarf2read.c 17 Jan 2004 01:03:23 -0000
@@ -612,13 +612,6 @@
}
static void
-dwarf2_unsupported_at_frame_base_complaint (const char *arg1)
-{
- complaint (&symfile_complaints,
- "unsupported DW_AT_frame_base for function '%s'", arg1);
-}
-
-static void
dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
int arg3)
{
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.16
diff -u -r1.16 sh64-tdep.c
--- sh64-tdep.c 13 Jan 2004 21:38:47 -0000 1.16
+++ sh64-tdep.c 17 Jan 2004 01:03:23 -0000
@@ -1,6 +1,7 @@
/* Target-dependent code for Renesas Super-H, for GDB.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -828,12 +829,6 @@
is_media_pseudo (int rn)
{
return (rn >= DR0_REGNUM && rn <= FV_LAST_REGNUM);
-}
-
-static int
-sh64_get_gdb_regnum (int gcc_regnum, CORE_ADDR pc)
-{
- return translate_insn_rn (gcc_regnum, pc_is_isa32 (pc));
}
static int
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.70
diff -u -r1.70 stabsread.c
--- stabsread.c 5 Jan 2004 19:53:07 -0000 1.70
+++ stabsread.c 17 Jan 2004 01:03:23 -0000
@@ -1,7 +1,8 @@
/* Support routines for decoding "stabs" debugging information format.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -89,8 +90,6 @@
read_one_struct_field (struct field_info *, char **, char *,
struct type *, struct objfile *);
-static char *get_substring (char **, int);
-
static struct type *dbx_alloc_type (int[2], struct objfile *);
static long read_huge_number (char **, int, int *);
@@ -194,12 +193,6 @@
complaint (&symfile_complaints, "%s", arg1);
}
-static void
-lrs_general_complaint (const char *arg1)
-{
- complaint (&symfile_complaints, "%s", arg1);
-}
-
/* Make a list of forward references which haven't been defined. */
static struct type **undef_types;
@@ -531,16 +524,6 @@
if (refnum < 0 || refnum > ref_count)
return 0;
return ref_map[refnum].sym;
-}
-
-/* Return value for the reference REFNUM. */
-
-static CORE_ADDR
-ref_search_value (int refnum)
-{
- if (refnum < 0 || refnum > ref_count)
- return 0;
- return ref_map[refnum].value;
}
/* Parse a reference id in STRING and return the resulting
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.114
diff -u -r1.114 symfile.c
--- symfile.c 23 Nov 2003 19:24:05 -0000 1.114
+++ symfile.c 17 Jan 2004 01:03:23 -0000
@@ -1,7 +1,7 @@
/* Generic symbol file reading for the GNU debugger, GDB.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
@@ -198,20 +198,6 @@
int auto_solib_limit;
\f
-
-/* Since this function is called from within qsort, in an ANSI environment
- it must conform to the prototype for qsort, which specifies that the
- comparison function takes two "void *" pointers. */
-
-static int
-compare_symbols (const void *s1p, const void *s2p)
-{
- struct symbol **s1, **s2;
-
- s1 = (struct symbol **) s1p;
- s2 = (struct symbol **) s2p;
- return (strcmp (SYMBOL_NATURAL_NAME (*s1), SYMBOL_NATURAL_NAME (*s2)));
-}
/* This compares two partial symbols by names, using strcmp_iw_ordered
for the comparison. */
next prev parent reply other threads:[~2004-01-17 1:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-11 18:26 Andrew Cagney
2004-01-12 2:05 ` Daniel Jacobowitz
2004-01-12 14:58 ` Andrew Cagney
2004-01-15 18:46 ` Elena Zannoni
2004-01-17 1:04 ` Andrew Cagney [this message]
2004-01-19 18:31 ` Andrew Cagney
2004-01-19 23:14 ` Kevin Buettner
2004-01-19 23:21 ` Kevin Buettner
2004-02-03 22:23 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40088A27.7040902@gnu.org \
--to=cagney@gnu.org \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox