[vlc-devel] [PATCH 2/3] configure: add -Werror=incompatible-pointer-types option to the compiler

Steve Lhomme robux4 at ycbcr.xyz
Tue Dec 17 15:09:28 CET 2019

This avoid using pointers of different types. It may lead to serious issues in
the code so rather than a warning, it should be avoided/fixed.

This is tested on Linux and Windows builds succesfully.
 configure.ac | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ffd58e85039..9088342a896 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,8 +84,10 @@ AS_IF([test -n "${with_binary_version}"],[
 dnl Prevent clang from accepting unknown flags with a mere warning
-AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CFLAGS])
-AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CXXFLAGS])
+AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument
+                         -Werror=incompatible-pointer-types], [CFLAGS])
+AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument
+                         -Werror=incompatible-pointer-types], [CXXFLAGS])
 dnl  Check the operating system

More information about the vlc-devel mailing list