Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition

... if --enable-werror is used

Change-Id: Ib397f3ad748e17f20b6177ef706af65088571f70
This commit is contained in:
Harald Welte 2022-11-03 11:59:21 +01:00
parent 9befdeb673
commit 6ea8d7dac6
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ AC_ARG_ENABLE(werror,
if test x"$werror" = x"yes"
then
WERROR_FLAGS="-Werror"
WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
CFLAGS="$CFLAGS $WERROR_FLAGS"