Преглед изворни кода

build: Add more warnings to --enable-compiler-warnings

Guillem Jover пре 16 година
родитељ
комит
b4284af48c
1 измењених фајлова са 9 додато и 3 уклоњено
  1. 9 3
      m4/dpkg-compiler.m4

+ 9 - 3
m4/dpkg-compiler.m4

@@ -9,13 +9,19 @@ AC_DEFUN([DPKG_COMPILER_WARNINGS],
 [AC_ARG_ENABLE(compiler-warnings,
 	AS_HELP_STRING([--enable-compiler-warnings],
 	               [Enable additional compiler warnings]),
-[WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+[WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
+	 -Wmissing-declarations -Wmissing-format-attribute \
+	 -Wvla -Winit-self -Wwrite-strings -Wcast-align"
+WCFLAGS="-Wdeclaration-after-statement -Wnested-externs -Wbad-function-cast \
+	 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
+# Temporarily here until #542031 gets fixed in ncurses
+WCXXFLAGS="-Wno-unused-value"
 if test "x$enable_compiler_warnings" = "xyes"; then
 	if test "x$GCC" = "xyes"; then
-		CFLAGS="$WFLAGS $CFLAGS"
+		CFLAGS="$WFLAGS $WCFLAGS $CFLAGS"
         fi
 	if test "x$GXX" = "xyes"; then
-		CXXFLAGS="$WFLAGS $CXXFLAGS"
+		CXXFLAGS="$WFLAGS $WCXXFLAGS $CXXFLAGS"
 	fi
 fi])dnl
 ])