summaryrefslogtreecommitdiff
path: root/travis-autogen.sh
diff options
context:
space:
mode:
authorLudovic Rousseau <ludovic.rousseau@free.fr>2016-02-27 17:17:24 +0100
committerLudovic Rousseau <ludovic.rousseau@free.fr>2016-03-02 16:07:22 +0100
commit765a1fbf8b80c62b98e05e6d89cbe5fe32d76169 (patch)
tree22509235bc480cb130b681af622b050a9b549168 /travis-autogen.sh
parent686ccc284b9c54984fce6a8d2a29d020ede773a9 (diff)
downloadlibusb-765a1fbf8b80c62b98e05e6d89cbe5fe32d76169.tar.gz
travis-CI: fails compilation on warning
The travis-autogen.sh script enable some extra warnings not used by default. The idea is to detect problem as early as possible.
Diffstat (limited to 'travis-autogen.sh')
-rwxr-xr-xtravis-autogen.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/travis-autogen.sh b/travis-autogen.sh
new file mode 100755
index 0000000..d83e07d
--- /dev/null
+++ b/travis-autogen.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# Warnings enabled
+CFLAGS="-Wall -Wextra"
+
+CFLAGS+=" -Wbad-function-cast"
+#CFLAGS+=" -Wcast-align"
+CFLAGS+=" -Wchar-subscripts"
+CFLAGS+=" -Wempty-body"
+CFLAGS+=" -Wformat"
+CFLAGS+=" -Wformat-security"
+CFLAGS+=" -Winit-self"
+CFLAGS+=" -Winline"
+CFLAGS+=" -Wmissing-declarations"
+CFLAGS+=" -Wmissing-include-dirs"
+CFLAGS+=" -Wmissing-prototypes"
+CFLAGS+=" -Wnested-externs"
+CFLAGS+=" -Wold-style-definition"
+CFLAGS+=" -Wpointer-arith"
+CFLAGS+=" -Wredundant-decls"
+CFLAGS+=" -Wshadow"
+CFLAGS+=" -Wstrict-prototypes"
+CFLAGS+=" -Wswitch-enum"
+CFLAGS+=" -Wundef"
+CFLAGS+=" -Wuninitialized"
+CFLAGS+=" -Wunused"
+CFLAGS+=" -Wwrite-strings"
+CFLAGS+=" -fdiagnostics-color=auto"
+
+# warnings disabled on purpose
+CFLAGS+=" -Wno-unused-parameter"
+CFLAGS+=" -Wno-unused-function"
+CFLAGS+=" -Wno-deprecated-declarations"
+
+# should be removed and the code fixed
+CFLAGS+=" -Wno-incompatible-pointer-types-discards-qualifiers"
+
+# fails on warning
+CFLAGS+=" -Werror"
+
+./autogen.sh