2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-02 23:35:27 +00:00

travis: Fix checks skipping by sparse.

Recent commit in "sparse" broke checking the OVS sources, because
'make' uses '-MD' flag to generate dependencies as a side effect
within compilation commands, but "sparse" skips all the build commands
that contains '-MD' and friends.
Let's revert the bad commit as a workaround before installing "sparse"
in TravisCI.

Additionally fixed a false-positive:
./lib/bitmap.h:64:29: error: shift too big (64) for type unsigned long

CC: Yi-Hung Wei <yihung.wei@gmail.com>
Fixes: 879e8238df ("travis: Update sparse git repo")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ilya Maximets
2019-04-24 16:00:22 +03:00
committed by Ben Pfaff
parent 146ee62626
commit 46124c18b0
2 changed files with 9 additions and 2 deletions

View File

@@ -8,7 +8,14 @@ set -ev
# environments claim to have LLVM (llvm-config exists and works) but
# linking against it fails.
git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git
cd sparse && make -j4 HAVE_LLVM= install && cd ..
cd sparse
# Commit bb1bf748580d ("cgcc: gendeps for -MM, -MD & -MMD too") makes
# sparse ignore almost all source files, because 'make' uses '-MD' to
# generate dependencies as a side effect within compilation commands.
git revert bb1bf748580d --no-commit
git diff HEAD
make -j4 HAVE_LLVM= install
cd ..
pip install --disable-pip-version-check --user six flake8 hacking
pip install --user --upgrade docutils

View File

@@ -61,7 +61,7 @@ bitmap_init1(unsigned long *bitmap, size_t n_bits)
memset(bitmap, 0xff, n_bytes);
if (r_bits) {
bitmap[n_longs - 1] >>= BITMAP_ULONG_BITS - r_bits;
bitmap[n_longs - 1] = (1UL << r_bits) - 1;
}
return bitmap;
}