Commit ff7a2ce9 authored by Ghislain MARY's avatar Ghislain MARY

Activate compilation warnings for non-strict prototypes in C.

parent 095dcbe5
......@@ -473,7 +473,7 @@ set(STRICT_OPTIONS_C )
set(STRICT_OPTIONS_OBJC "-Wno-error")
if(NOT MSVC)
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")
list(APPEND STRICT_OPTIONS_CPP "-Qunused-arguments" "-Wno-unused-function" "-Wno-array-bounds")
endif()
......
......@@ -57,7 +57,7 @@ AC_ARG_ENABLE(strict,
)
STRICT_OPTIONS="-Wall -Wuninitialized"
STRICT_OPTIONS_CC="-Wdeclaration-after-statement "
STRICT_OPTIONS_CC="-Wdeclaration-after-statement -Wstrict-prototypes"
STRICT_OPTIONS_CXX=""
#for clang
......@@ -82,7 +82,7 @@ case "$target_os" in
esac
if test "$strictness" = "yes" ; then
STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
STRICT_OPTIONS="$STRICT_OPTIONS -Werror -Wno-error=strict-prototypes"
CFLAGS="$CFLAGS -fno-strict-aliasing"
fi
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