summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-03 08:46:05 +0700
committerJunio C Hamano <gitster@pobox.com>2018-03-05 12:56:30 -0800
commitb1d1f64bce1eceb844f9c40e8ae43953df404d5c (patch)
tree54679c2904c3aaefd86dbb34322b7261f026d968
parent38e79b1fdab9244e1727d0698afcf3bb8956c0a4 (diff)
downloadgit-nd/travis-linux-gcc-more-warnings.tar.gz
travis-ci: enable more warnings on travis linux-gcc jobnd/travis-linux-gcc-more-warnings
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. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.travis.yml3
-rwxr-xr-xci/run-build.sh15
2 files changed, 18 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 4684b3f4f3..273b1d508a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,10 +16,13 @@ compiler:
addons:
apt:
+ sources:
+ - ubuntu-toolchain-r-test
packages:
- language-pack-is
- git-svn
- apache2
+ - gcc-6
matrix:
include:
diff --git a/ci/run-build.sh b/ci/run-build.sh
index 4f940d1032..04e163359c 100755
--- a/ci/run-build.sh
+++ b/ci/run-build.sh
@@ -5,4 +5,19 @@
. ${0%/*}/lib-travisci.sh
+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
make --jobs=2