diff --git a/.travis.yml b/.travis.yml index 18eefce..77ae39d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,8 @@ script: - | autoreconf -f -i tests=disable; if [ "$TRAVIS_OS_NAME" = "linux" ]; then tests=enable; fi - env CFLAGS="${WERR_CFLAGS}" ./configure --${tests}-tests - make -j2 V=1 + ./configure --${tests}-tests || cat config.log + make -j2 CFLAGS="${WARN_CFLAGS}" V=1 make check V=1 addons: diff --git a/config/travis.cflags.sh b/config/travis.cflags.sh index 9670b80..db57f9a 100644 --- a/config/travis.cflags.sh +++ b/config/travis.cflags.sh @@ -1,15 +1,42 @@ #!/bin/bash -WERR_CFLAGS="\ +WARN_CFLAGS="\ + -O2 \ + -Wall -Wextra \ + -fno-common \ + -Wshadow \ + -Wpointer-arith \ + -Wformat=2 \ + -Wswitch-default \ + -Wswitch-enum \ + -Wcast-align \ + -Wcast-qual \ + -Wconversion \ + -Wpointer-arith \ + -Wbad-function-cast \ + -Wstrict-overflow=5 \ + -Winline \ + -Wundef \ + -Wnested-externs \ + -Wunreachable-code \ + -Wfloat-equal \ + -Wstrict-aliasing=2 \ + -Wredundant-decls \ + -Wold-style-definition \ -Werror=implicit-function-declaration \ + -Werror=strict-prototypes \ + -Werror=missing-prototypes \ + -Werror=missing-braces \ + -Werror=missing-field-initializers \ -Werror=varargs \ " -WERR_CFLAGS_OSX="\ - -Werror=unguarded-availability-new \ -" -if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - WERR_CFLAGS+=" ${WERR_CFLAGS_OSX}"; +if [[ ${TRAVIS_OS_NAME} = "osx" ]]; then + WARN_CFLAGS+=" -Werror=unguarded-availability-new"; +fi + +if [[ ${CC_FOR_BUILD} == "gcc" ]]; then + WARN_CFLAGS+=" -Wlogical-op"; fi -export WERR_CFLAGS +export WARN_CFLAGS