Skip to content

Commit

Permalink
travis: Enable -Wsparse-error and fail on new sparse warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Thomas Graf authored and blp committed Nov 11, 2014
1 parent c453c5a commit 67af7d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $*

Expand Down
5 changes: 2 additions & 3 deletions .travis/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..

0 comments on commit 67af7d7

Please sign in to comment.