A new option -Wsparse-error has been introduced to sparse in the
commits:

        4d8811 sparse: Make -Werror turn warnigns into errors
        fe57af rename -Werror to -Wsparse-error

which makes sparse fail on warnings. Start using the sparse git tree
for verification and make use of the new flag.

Signed-off-by: Thomas Graf <tg...@noironetworks.com>
---
 .travis/build.sh   | 7 +++++--
 .travis/prepare.sh | 5 ++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.travis/build.sh b/.travis/build.sh
index 5dba4fe..1bf0815 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -39,11 +39,14 @@ if [ "$KERNEL" ] || [ "$DPDK" ]; then
     install_kernel
 fi
 
-[ "$DPDK" ] && {
+if [ "$DPDK" ]; then
     install_dpdk
     # Disregard bad function cassts until DPDK is fixed
     CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
-}
+elif [ $CC != "clang" ]; then
+    # DPDK headers currently trigger sparse errors
+    CFLAGS="$CFLAGS -Wsparse-error"
+fi
 
 configure_ovs $*
 
diff --git a/.travis/prepare.sh b/.travis/prepare.sh
index 6b5df00..f8bd0a1 100755
--- a/.travis/prepare.sh
+++ b/.travis/prepare.sh
@@ -3,6 +3,5 @@
 sudo apt-get update -qq
 sudo apt-get install -qq libssl-dev llvm-dev
 
-wget https://www.kernel.org/pub/software/devel/sparse/dist/sparse-0.5.0.tar.gz
-tar -xzvf sparse-0.5.0.tar.gz
-cd sparse-0.5.0 && make && sudo make install PREFIX=/usr && cd ..
+git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
+cd sparse && make && sudo make install PREFIX=/usr && cd ..
-- 
1.9.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to