sim: use -Wunused-but-set-parameter
authorMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 01:05:17 +0000 (21:05 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 02:28:50 +0000 (22:28 -0400)
The code is already clean, so sync this over from gdb warning.m4.
Also shuffle the order of the flags a bit to match the current gdb
warning.m4 code.

sim/ChangeLog
sim/configure
sim/m4/sim_ac_option_warnings.m4

index 959d3582da19c00c8780d53f706bbb98918f0828..59c123de79cab4e3ebb6d4a7c85c817285ab57b3 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-29  Mike Frysinger  <vapier@gentoo.org>
+
+       * m4/sim_ac_option_warnings.m4: Add -Wunused-but-set-parameter.
+       * configure: Regenerate.
+
 2021-06-29  Mike Frysinger  <vapier@gentoo.org>
 
        * m4/sim_ac_option_warnings.m4: Add -Wno-error=maybe-uninitialized.
index 3120006e6d563c64ce768a41a6bfda93632ba0a2..94b45fd5f187cee1ce9110f1f1d9e91bfacad6ed 100755 (executable)
@@ -14584,13 +14584,17 @@ if test "${ERROR_ON_WARNING}" = yes ; then
   WERROR_CFLAGS="-Werror"
 fi
 
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
+-Wno-unused -Wunused-value -Wunused-function
+-Wno-switch -Wno-char-subscripts
+-Wempty-body -Wunused-but-set-parameter
 -Wno-error=maybe-uninitialized
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
+-Wmissing-declarations
+-Wmissing-prototypes
+-Wdeclaration-after-statement -Wmissing-parameter-type
+-Wpointer-sign
+-Wold-style-declaration -Wold-style-definition
+"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
index 05c77f1b92de6a8559a56d32d5aa2e907fa20744..4deacc1b958345f885f57dc94a4a290a524aa749 100644 (file)
@@ -37,13 +37,17 @@ fi
 
 dnl The options we'll try to enable.
 dnl NB: Kept somewhat in sync with gdbsupport/warnings.m4.
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
+-Wno-unused -Wunused-value -Wunused-function
+-Wno-switch -Wno-char-subscripts
+-Wempty-body -Wunused-but-set-parameter
 -Wno-error=maybe-uninitialized
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
+-Wmissing-declarations
+-Wmissing-prototypes
+-Wdeclaration-after-statement -Wmissing-parameter-type
+-Wpointer-sign
+-Wold-style-declaration -Wold-style-definition
+"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.