Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job
From: Jeff King <hidden>
Date: 2018-03-16 21:22:15
On Fri, Mar 16, 2018 at 08:33:55PM +0100, Nguyễn Thái Ngọc Duy wrote:
We have DEVELOPER config to enable more warnings, but since we can't set a fixed gcc version to all devs, that has to be a bit more conservative. On travis, we know almost exact version to be used (bumped to 6.x for more warnings), we could be more aggressive.
Certainly it makes sense to dial up any static checks we can for the Travis environment, but...
quoted hunk ↗ jump to hunk
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 3735ce413f..f6f346c468 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh@@ -7,6 +7,22 @@ ln -s "$cache_dir/.prove" t/.prove +if [ "$jobname" = linux-gcc ]; then + gcc-6 --version + cat >config.mak <<-EOF + CC=gcc-6 + CFLAGS = -g -O2 -Wall + CFLAGS += -Wextra + CFLAGS += -Wmissing-prototypes + CFLAGS += -Wno-empty-body + CFLAGS += -Wno-maybe-uninitialized + CFLAGS += -Wno-missing-field-initializers + CFLAGS += -Wno-sign-compare + CFLAGS += -Wno-unused-function + CFLAGS += -Wno-unused-parameter + EOF +fi
Why isn't this just turning on DEVELOPER=1 if we know we have a capable compiler? -Peff