Always use maintainer mode -Wno cflags
* configure.ac (CFLAGS): Move -Wno flags out of the maintainer mode. -- It makes sense to have more warnings in maintainer mode and not more warnings in release builds. GnuPG-Bug-Id: T4477
This commit is contained in:
parent
0ed8149814
commit
33b13d1c29
33
configure.ac
33
configure.ac
@ -599,27 +599,30 @@ AM_SUBST_NOTMAKE(API__SSIZE_T)
|
|||||||
# Checks for compiler features.
|
# Checks for compiler features.
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
||||||
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
CFLAGS="$CFLAGS -Wno-format-y2k"
|
||||||
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
|
|
||||||
|
|
||||||
# If -Wno-missing-field-initializers is supported we can enable a
|
# If -Wno-missing-field-initializers is supported we can expect a
|
||||||
# a bunch of really useful warnings.
|
# a larger set of warning options.
|
||||||
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
|
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
|
||||||
_gcc_cflags_save=$CFLAGS
|
_gcc_cflags_save=$CFLAGS
|
||||||
CFLAGS="-Wno-missing-field-initializers"
|
CFLAGS="-Wno-missing-field-initializers"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
|
||||||
AC_MSG_RESULT($_gcc_wopt)
|
AC_MSG_RESULT($_gcc_wopt)
|
||||||
CFLAGS=$_gcc_cflags_save;
|
CFLAGS=$_gcc_cflags_save;
|
||||||
|
if test x"$_gcc_wopt" = xyes ; then
|
||||||
|
CFLAGS="$CFLAGS -Wno-missing-field-initializers"
|
||||||
|
CFLAGS="$CFLAGS -Wno-sign-compare"
|
||||||
|
CFLAGS="$CFLAGS -Wno-format-zero-length"
|
||||||
|
CFLAGS="$CFLAGS -Wno-format-truncation"
|
||||||
|
CFLAGS="$CFLAGS -Wno-sizeof-pointer-div"
|
||||||
|
fi
|
||||||
|
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
||||||
if test x"$_gcc_wopt" = xyes ; then
|
if test x"$_gcc_wopt" = xyes ; then
|
||||||
CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
|
CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
|
||||||
CFLAGS="$CFLAGS -Wwrite-strings"
|
CFLAGS="$CFLAGS -Wwrite-strings"
|
||||||
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
||||||
CFLAGS="$CFLAGS -Wno-missing-field-initializers"
|
|
||||||
CFLAGS="$CFLAGS -Wno-sign-compare"
|
|
||||||
CFLAGS="$CFLAGS -Wno-format-zero-length"
|
|
||||||
CFLAGS="$CFLAGS -Wno-format-truncation"
|
|
||||||
CFLAGS="$CFLAGS -Wno-sizeof-pointer-div"
|
|
||||||
fi
|
fi
|
||||||
|
CFLAGS="$CFLAGS -Wformat -Wformat-security"
|
||||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
|
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
|
||||||
|
|
||||||
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
|
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
|
||||||
|
Loading…
Reference in New Issue
Block a user