Explorar o código

build: Add new gcc 5 warnings

Warn on features not present in ISO C99 but present in ISO C11,
on sizeof for an array argument, on switch keyword with bool
values, and logical not on the left handside of a comparison.
Guillem Jover %!s(int64=11) %!d(string=hai) anos
pai
achega
e66be31b1e
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      m4/dpkg-compiler.m4

+ 4 - 0
m4/dpkg-compiler.m4

@@ -47,8 +47,11 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
   DPKG_CHECK_COMPILER_FLAG([-Wmissing-declarations])
   DPKG_CHECK_COMPILER_FLAG([-Wmissing-format-attribute])
   DPKG_CHECK_COMPILER_FLAG([-Wformat -Wformat-security])
+  DPKG_CHECK_COMPILER_FLAG([-Wsizeof-array-argument])
   DPKG_CHECK_COMPILER_FLAG([-Wpointer-arith])
   DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
+  DPKG_CHECK_COMPILER_FLAG([-Wlogical-not-parentheses])
+  DPKG_CHECK_COMPILER_FLAG([-Wswitch-bool])
   DPKG_CHECK_COMPILER_FLAG([-Wvla])
   DPKG_CHECK_COMPILER_FLAG([-Winit-self])
   DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
@@ -63,6 +66,7 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
     DPKG_CHECK_COMPILER_FLAG([-Wstrict-prototypes])
     DPKG_CHECK_COMPILER_FLAG([-Wmissing-prototypes])
     DPKG_CHECK_COMPILER_FLAG([-Wold-style-definition])
+    DPKG_CHECK_COMPILER_FLAG([-Wc99-c11-compat])
   ],
   [C++], [
     DPKG_CHECK_COMPILER_FLAG([-Wc++11-compat])