Add "-Wextra" because it's good.
Add "-Wshadow" because it's good, but covered by neither "-Wall"
or
"-Wextra".
Exclude warnings about unused parameters (i.e., add
"-Wno-unused-parameter"); while normally it would be valuable, we have a
whole bunch of GTK callbacks with fixed parameter lists but no actual use
for those params in our callback bodies. Littering the code with tens of
"__attribute__ ((unused))" decorations is arguably worse than silencing
this one warning type.
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
m4/p2v-c.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/p2v-c.m4 b/m4/p2v-c.m4
index bbf48625ae05..d23e1977b921 100644
--- a/m4/p2v-c.m4
+++ b/m4/p2v-c.m4
@@ -38,7 +38,7 @@ AC_ARG_ENABLE([werror],
gcc_warnings=$enableval],
[gcc_warnings=no]
)
-WARN_CFLAGS="-Wall"
+WARN_CFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter"
AC_SUBST([WARN_CFLAGS])
if test "x$gcc_warnings" = "xyes"; then
WERROR_CFLAGS="-Werror"