From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6254 invoked by alias); 17 Jan 2004 01:04:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6247 invoked from network); 17 Jan 2004 01:04:41 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 17 Jan 2004 01:04:41 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 973712B8F; Fri, 16 Jan 2004 20:04:39 -0500 (EST) Message-ID: <40088A27.7040902@gnu.org> Date: Sat, 17 Jan 2004 01:04:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: [commit] rm unused symtab & sh functions; Was: [obish] -Wunused-function warnings References: <400194E8.10201@gnu.org> <16390.57220.51774.395649@localhost.redhat.com> Content-Type: multipart/mixed; boundary="------------050207040104090809020900" X-SW-Source: 2004-01/txt/msg00430.txt.bz2 This is a multi-part message in MIME format. --------------050207040104090809020900 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1033 > 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 --------------050207040104090809020900 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 4816 2004-01-16 Andrew Cagney * 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; - -/* 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. */ --------------050207040104090809020900--