Commit 56de5bf2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove the Werror stuff for good

This is not portable across compilers and versions.
This belong in your own personal CFLAGS, not the build system.
parent 73ca4071
...@@ -971,16 +971,6 @@ CFLAGS="${CFLAGS_save}" ...@@ -971,16 +971,6 @@ CFLAGS="${CFLAGS_save}"
RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration]) RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
RDC_PROG_CC_FLAGS([-pipe]) RDC_PROG_CC_FLAGS([-pipe])
AC_ARG_ENABLE(warnings-as-error,
AS_HELP_STRING([--enable-warnings-as-error],[Treat acceptable warnings as error (default disabled)]),, [enable_warnings_as_error="no"])
AS_IF([test "${enable_warnings_as_error}" = "yes"], [
RDC_PROG_CC_WERRORFLAGS([unused-function unused-label unused-value unused-parameter unused-variable unused \
missing-braces nonnull parentheses uninitialized address enum-compare undef comment switch \
bad-function-cast implicit sequence-point strict-aliasing array-bounds missing-parameter-type \
overflow int-to-pointer-cast pointer-to-int-cast div-by-zero overflow ignored])
])
AC_SUBST(CFLAGS_WERROR)
dnl Check for various optimization flags dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os], AC_CACHE_CHECK([if \$CC accepts -Os],
[ac_cv_c_os], [ac_cv_c_os],
......
...@@ -31,12 +31,6 @@ AC_DEFUN([RDC_PROG_CC_FLAGS], ...@@ -31,12 +31,6 @@ AC_DEFUN([RDC_PROG_CC_FLAGS],
RDC_PROG_CC_FLAGS_IFELSE([$1], [CFLAGS="${CFLAGS} $1"]) RDC_PROG_CC_FLAGS_IFELSE([$1], [CFLAGS="${CFLAGS} $1"])
]) ])
AC_DEFUN([RDC_PROG_CC_WERRORFLAGS],
[ for a in $1; do
RDC_PROG_CC_FLAGS_IFELSE([-Werror=$a], [CFLAGS_WERROR="${CFLAGS_WERROR} -Werror=${a}"])
done
])
AC_DEFUN([RDC_PROG_CC_WFLAGS], AC_DEFUN([RDC_PROG_CC_WFLAGS],
[ for a in $1; do [ for a in $1; do
RDC_PROG_CC_FLAGS([-W$a]) RDC_PROG_CC_FLAGS([-W$a])
......
...@@ -60,13 +60,6 @@ AC_DEFUN([VLC_ADD_LIBS], [ ...@@ -60,13 +60,6 @@ AC_DEFUN([VLC_ADD_LIBS], [
]) ])
]) ])
AC_DEFUN([VLC_SET_CFLAGS_WERROR], [
m4_foreach_w([element], [$1], [
[eval "CFLAGS_WERROR_]element[="'"'"$2"'"']
[am_modules_with_werror="${am_modules_with_werror} ]element["]
])
])
dnl =========================================================================== dnl ===========================================================================
dnl Macros to save and restore default flags dnl Macros to save and restore default flags
...@@ -95,7 +88,7 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [ ...@@ -95,7 +88,7 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [
AC_MSG_RESULT(configure: creating ./vlc-config.in) AC_MSG_RESULT(configure: creating ./vlc-config.in)
am_all_modules="`for x in ${am_modules_with_cppflags} ${am_modules_with_cflags} ${am_modules_with_cxxflags} ${am_modules_with_objcflags} ${am_modules_with_ldflags} ${am_modules_with_libs} ${am_modules_with_werror}; do echo $x; done | sort | uniq`" am_all_modules="`for x in ${am_modules_with_cppflags} ${am_modules_with_cflags} ${am_modules_with_cxxflags} ${am_modules_with_objcflags} ${am_modules_with_ldflags} ${am_modules_with_libs}; do echo $x; done | sort | uniq`"
rm -f vlc-config.in rm -f vlc-config.in
sed -ne '/#@1@#/q;p' < "${srcdir}/vlc-config.in.in" \ sed -ne '/#@1@#/q;p' < "${srcdir}/vlc-config.in.in" \
...@@ -140,9 +133,6 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [ ...@@ -140,9 +133,6 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [
if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then
echo " libs=\"\${libs} `eval echo '$'LIBS_${x}`\"" echo " libs=\"\${libs} `eval echo '$'LIBS_${x}`\""
fi fi
if test "`eval echo @'$'CFLAGS_WERROR_${x}@`" != "@@"; then
echo " cflags_werror=\"`eval echo '$'CFLAGS_WERROR_${x}`\""
fi
echo " ;;" echo " ;;"
] done >> vlc-config.in ] done >> vlc-config.in
......
...@@ -26,8 +26,6 @@ cflags_optim_speed="@CFLAGS_OPTIM_SPEED@" ...@@ -26,8 +26,6 @@ cflags_optim_speed="@CFLAGS_OPTIM_SPEED@"
cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@" cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@"
cflags_nooptim="@CFLAGS_NOOPTIM@" cflags_nooptim="@CFLAGS_NOOPTIM@"
cflags_werror="@CFLAGS_WERROR@"
# #
# Do not touch below this place unless you really know what you are doing # Do not touch below this place unless you really know what you are doing
# #
...@@ -213,10 +211,6 @@ while test $# -gt 0; do ...@@ -213,10 +211,6 @@ while test $# -gt 0; do
echo_builtin=yes echo_builtin=yes
cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__" cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__"
;; ;;
libs)
# Avoid to use werror on what is not vlc's code.
cflags_werror=""
;;
pic) pic)
;; ;;
mozilla) mozilla)
...@@ -239,12 +233,6 @@ if test -n "${module}"; then ...@@ -239,12 +233,6 @@ if test -n "${module}"; then
cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\"" cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
fi fi
#
# Set the Werror flags.
#
cflags="${cflags} ${cflags_werror}"
# #
# Output what we were asked # Output what we were asked
# #
......
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