From e9ccf0f7e31945e39f85de28b3e8660e90c87e73 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Sun, 20 May 2018 11:07:59 +0200 Subject: [PATCH] add -Werror=string-plus-int to travis clang build --- build-scripts/travis.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build-scripts/travis.sh b/build-scripts/travis.sh index bdaf1060a..43c7263cd 100755 --- a/build-scripts/travis.sh +++ b/build-scripts/travis.sh @@ -376,7 +376,7 @@ install_dnsdist() { build_auth() { run "autoreconf -vi" # Build without --enable-botan, no botan 2.x in Travis CI - run "CFLAGS='-O1 -Werror=vla' CXXFLAGS='-O1 -Werror=vla' ./configure \ + run "./configure \ --with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns godbc lua2' \ --with-modules='' \ --with-sqlite3 \ @@ -404,7 +404,7 @@ build_recursor() { run "rm -f pdns-recursor-*.tar.bz2" run "cd pdns-recursor-*" # Build without --enable-botan, no botan 2.x in Travis CI - run "CFLAGS='-O1 -Werror=vla' CXXFLAGS='-O1 -Werror=vla' CXX=${COMPILER} ./configure \ + run "CXX=${COMPILER} ./configure \ --prefix=$PDNS_RECURSOR_DIR \ --enable-libsodium \ --enable-unit-tests \ @@ -420,7 +420,7 @@ build_dnsdist(){ run "cd pdns/dnsdistdist" run "tar xf dnsdist*.tar.bz2" run "cd dnsdist-*" - run "CFLAGS='-O1 -Werror=vla' CXXFLAGS='-O1 -Werror=vla' ./configure \ + run "./configure \ --enable-unit-tests \ --enable-libsodium \ --enable-dnscrypt \ @@ -610,6 +610,14 @@ run "wget http://ppa.launchpad.net/kalon33/gamesgiroll/ubuntu/pool/main/libs/lib run "sudo dpkg -i libsodium-dev_1.0.3-1~ppa14.04+1_amd64.deb libsodium13_1.0.3-1~ppa14.04+1_amd64.deb" run "cd ${TRAVIS_BUILD_DIR}" +compilerflags="-O1 -Werror=vla" +if [ "$CC" = "clang" ] +then + compilerflags="$compilerflags -Werror=string-plus-int" +fi +export CFLAGS=$compilerflags +export CXXFLAGS=$compilerflags + install_$PDNS_BUILD_PRODUCT build_$PDNS_BUILD_PRODUCT -- 2.50.1