This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/commit 4/4] Add -Wunused-function to compile flags.


As discussed earlier, this is a patch that adds -Wunused-function to
our list of warning flags used during compilation.

gdb/ChangeLog:

        * configure.ac: Add -Wunused-function to build_warnings.
        * configure: Regenerate.

This is depending on the previous 3 patches that delete some of the
unused files.  It has been tested on x86_64-linux where all unused
functions should have been removed.  Given the number of unused
functions it found, I wouldn't be surprised if it triggers more errors
on other ports...

I will commit shortly after having checked in the first 3 patches.

---
 gdb/configure    |    3 ++-
 gdb/configure.ac |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index ff49f1d..5499f5a 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -13434,7 +13434,8 @@ fi
 # gdb/doc/gdbint.texinfo.
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wformat-nonliteral -Wno-pointer-sign \
--Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts"
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 4831ab0..e60a4aa 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1543,7 +1543,8 @@ fi
 # gdb/doc/gdbint.texinfo.
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wformat-nonliteral -Wno-pointer-sign \
--Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts"
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]