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 <pclo...@gmail.com>
---
 .travis.yml     |  3 +++
 ci/run-build.sh | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

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
-- 
2.16.1.435.g8f24da2e1a

Reply via email to