public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 6/6] Add -Wunused-but-set-* to build
Date: Mon, 06 Jun 2016 21:34:00 -0000	[thread overview]
Message-ID: <1465248812-23902-7-git-send-email-tom@tromey.com> (raw)
In-Reply-To: <1465248812-23902-1-git-send-email-tom@tromey.com>

This adds -Wunused-but-set-variable and -Wunused-but-set-parameter to
configure.

2016-06-06  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* warning.m4 (AM_GDB_WARNINGS) <build_warnings>: Add
	-Wunused-but-set-parameter, -Wunused-but-set-variable.

2016-06-06  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
---
 gdb/ChangeLog           | 6 ++++++
 gdb/configure           | 2 +-
 gdb/gdbserver/ChangeLog | 4 ++++
 gdb/gdbserver/configure | 2 +-
 gdb/warning.m4          | 2 +-
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eec280d..9c0ff17 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2016-06-06  Tom Tromey  <tom@tromey.com>
 
+	* configure: Rebuild.
+	* warning.m4 (AM_GDB_WARNINGS) <build_warnings>: Add
+	-Wunused-but-set-parameter, -Wunused-but-set-variable.
+
+2016-06-06  Tom Tromey  <tom@tromey.com>
+
 	* mips-tdep.c (micromips_scan_prologue): Remove "frame_addr".
 	(mips_o32_push_dummy_call): Remove "stack_used_p".
 	* aarch64-tdep.c (aarch64_record_data_proc_imm): Remove
diff --git a/gdb/configure b/gdb/configure
index 60ea884..957d0e4 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -14242,7 +14242,7 @@ fi
 build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
--Wempty-body"
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 079507a..8bef0bd 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-06  Tom Tromey  <tom@tromey.com>
+
+	* configure: Rebuild.
+
 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
 
 	* win32-low.c (win32_create_inferior): Add pointer casts for C++.
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 746218e..2926deb 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -6291,7 +6291,7 @@ fi
 build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
--Wempty-body"
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 55f1eb3..8d7ce68 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -39,7 +39,7 @@ fi
 build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
--Wempty-body"
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
-- 
2.5.5

  parent reply	other threads:[~2016-06-06 21:34 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 21:34 [RFA 0/6] Add -Wunused-but-set-parameter and -Wunused-but-set-variable Tom Tromey
2016-06-06 21:34 ` [RFA 4/6] Remove some variables but call functions for side effects Tom Tromey
2016-06-28 14:41   ` Yao Qi
2016-06-06 21:34 ` [RFA 2/6] Use ATTRIBUTE_UNUSED in some places Tom Tromey
2016-06-28 18:26   ` Pedro Alves
2016-06-28 20:58     ` Tom Tromey
2016-06-29  9:50       ` Pedro Alves
2016-06-06 21:34 ` Tom Tromey [this message]
2016-06-08  2:30   ` [RFA 6/6] Add -Wunused-but-set-* to build Trevor Saunders
2016-06-08  2:46     ` Tom Tromey
2016-06-08  3:18       ` Trevor Saunders
2016-06-08  3:43         ` Tom Tromey
2016-06-08  4:16           ` Tom Tromey
2016-06-08  4:26             ` Trevor Saunders
2016-06-06 21:34 ` [RFA 3/6] Comment out some unused overlay code Tom Tromey
2016-06-28 14:36   ` Yao Qi
2016-06-28 20:56     ` Tom Tromey
2016-06-29  8:51       ` Yao Qi
2016-06-06 21:34 ` [RFA 1/6] Change reopen_exec_file to check result of stat Tom Tromey
2016-06-28 14:21   ` Yao Qi
2016-06-06 21:34 ` [RFA 5/6] Remove unused variables Tom Tromey
2016-06-28 14:50   ` Yao Qi
2016-06-28 20:57     ` Tom Tromey
2016-06-29  8:50       ` Yao Qi
2016-07-13 20:43         ` Tom Tromey
2016-07-14  7:30           ` Yao Qi
2016-07-20 18:37           ` Maciej W. Rozycki
2016-07-20 18:46             ` Paul_Koning
2016-07-21 23:41               ` Maciej W. Rozycki
2016-07-20 19:49             ` Tom Tromey
2016-07-25 13:36               ` Maciej W. Rozycki
2016-06-28 15:02 ` [RFA 0/6] Add -Wunused-but-set-parameter and -Wunused-but-set-variable Yao Qi
2016-07-12 17:07   ` Tom Tromey
2016-07-13 13:45     ` Yao Qi
2016-07-14 16:49       ` Tom Tromey
2016-07-21 10:38   ` Pedro Alves
2016-07-21 11:10     ` Yao Qi
2016-07-21 11:35       ` Pedro Alves
2016-07-21 11:38         ` [PATCH 1/2] Remove unused variable in gdb/varobj.c when built without Python support Pedro Alves
2016-07-21 14:01           ` Yao Qi
2016-07-21 14:31             ` Pedro Alves
2016-07-21 11:38         ` [PATCH 2/2] Remove unused variable in windows-nat.c Pedro Alves
2016-07-21 14:03           ` Yao Qi
2016-07-21 14:31             ` Pedro Alves
2016-07-21 11:56         ` [RFA 0/6] Add -Wunused-but-set-parameter and -Wunused-but-set-variable Pedro Alves
2016-07-21 12:16           ` Pedro Alves
2016-07-21 14:47             ` Pedro Alves
2016-07-21 15:18               ` Pedro Alves
2016-07-21 16:38                 ` Yao Qi
2016-07-21 19:22                   ` Tom Tromey

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=1465248812-23902-7-git-send-email-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).