Commit ff7a2ce9 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Activate compilation warnings for non-strict prototypes in C.

parent 095dcbe5
...@@ -473,7 +473,7 @@ set(STRICT_OPTIONS_C ) ...@@ -473,7 +473,7 @@ set(STRICT_OPTIONS_C )
set(STRICT_OPTIONS_OBJC "-Wno-error") set(STRICT_OPTIONS_OBJC "-Wno-error")
if(NOT MSVC) if(NOT MSVC)
list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized") list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized")
list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement") list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement" "-Wstrict-prototypes" "-Wno-error=strict-prototypes")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang") if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
list(APPEND STRICT_OPTIONS_CPP "-Qunused-arguments" "-Wno-unused-function" "-Wno-array-bounds") list(APPEND STRICT_OPTIONS_CPP "-Qunused-arguments" "-Wno-unused-function" "-Wno-array-bounds")
endif() endif()
......
...@@ -57,7 +57,7 @@ AC_ARG_ENABLE(strict, ...@@ -57,7 +57,7 @@ AC_ARG_ENABLE(strict,
) )
STRICT_OPTIONS="-Wall -Wuninitialized" STRICT_OPTIONS="-Wall -Wuninitialized"
STRICT_OPTIONS_CC="-Wdeclaration-after-statement " STRICT_OPTIONS_CC="-Wdeclaration-after-statement -Wstrict-prototypes"
STRICT_OPTIONS_CXX="" STRICT_OPTIONS_CXX=""
#for clang #for clang
...@@ -82,7 +82,7 @@ case "$target_os" in ...@@ -82,7 +82,7 @@ case "$target_os" in
esac esac
if test "$strictness" = "yes" ; then if test "$strictness" = "yes" ; then
STRICT_OPTIONS="$STRICT_OPTIONS -Werror" STRICT_OPTIONS="$STRICT_OPTIONS -Werror -Wno-error=strict-prototypes"
CFLAGS="$CFLAGS -fno-strict-aliasing" CFLAGS="$CFLAGS -fno-strict-aliasing"
fi fi
AC_SUBST(STRICT_OPTIONS) AC_SUBST(STRICT_OPTIONS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment