mirror of
https://github.com/xiph/opus.git
synced 2025-05-29 06:39:15 +00:00
Add -Wdeclaration-after-statement.
We keep accidentally adding these which break the -pedantic build, so complain about it in the normal build. Also de-duplicate the warning list.
This commit is contained in:
parent
933a2754fc
commit
42f39c547b
1 changed files with 4 additions and 3 deletions
|
@ -224,12 +224,13 @@ AC_SUBST(SYMBOL_VISIBILITY)
|
|||
|
||||
CFLAGS="$CFLAGS -W"
|
||||
|
||||
warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wdeclaration-after-statement"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes"
|
||||
AC_MSG_CHECKING([if ${CC} supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes])
|
||||
CFLAGS="$CFLAGS $warn_CFLAGS"
|
||||
AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
||||
[ AC_MSG_RESULT([yes])
|
||||
EXTRA_WARNS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" ],
|
||||
EXTRA_WARNS=$warn_CFLAGS ],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS="$saved_CFLAGS $EXTRA_WARNS"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue