From 9142a46e89b1e2a312e1e2ed4ea8f9a934f318d4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 28 May 2020 11:33:55 +1200 Subject: [PATCH] Do a strict ./configure --enable-developer build to make warnings errors in CI This will make it harder to commit code that triggers warnings. This list of allowed warnings is too long, but can be trimmed down over time. Signed-off-by: Andrew Bartlett --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3386a993d..75996a852 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,12 @@ install: --with-berkeley-db \ --with-berkeley-db-include=/usr/local/opt/berkeley-db/include else - ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE + # This list of -Wno-error options should be reduced over time where possible + if [ x"$TRAVIS_COMPILER" != x"clang" ]; then + CFLAGS="-Wno-error=empty-body -Wno-error=shadow -Wno-error=unused-value -Wno-error=unused-but-set-variable -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE + else + CFLAGS="-Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE + fi fi - ulimit -c unlimited; make -j3