diff options
author | zugz (tox) <mbays+tox@sdf.org> | 2020-02-28 00:00:00 +0000 |
---|---|---|
committer | zugz (tox) <mbays+tox@sdf.org> | 2020-03-14 00:00:02 +0000 |
commit | c644ef76810f8db61bce3f52d36a1a6a25e47683 (patch) | |
tree | 1a4c5ed13f1a3450e3a005746ba6bb0d1af7beaf /.travis | |
parent | e6714909898d7e5fe6b35b6d109e584e6c5858b0 (diff) |
use -1 rather than ~0 in unsigned integer types
Using ~0 involves a bitwise operation on int, so depends on
the internal representation of signed integers.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/cmake-linux | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.travis/cmake-linux b/.travis/cmake-linux index 9b2a1fae..c0d175f8 100755 --- a/.travis/cmake-linux +++ b/.travis/cmake-linux | |||
@@ -7,6 +7,7 @@ set -eu | |||
7 | CACHEDIR="$HOME/cache" | 7 | CACHEDIR="$HOME/cache" |
8 | NPROC=`nproc` | 8 | NPROC=`nproc` |
9 | ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle" | 9 | ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle" |
10 | ASTYLE_VERSION=3.1 | ||
10 | 11 | ||
11 | install_tool() { | 12 | install_tool() { |
12 | SLUG="$1" | 13 | SLUG="$1" |
@@ -35,9 +36,10 @@ travis_install() { | |||
35 | } | 36 | } |
36 | 37 | ||
37 | # Install astyle (version in ubuntu-precise too old). | 38 | # Install astyle (version in ubuntu-precise too old). |
38 | [ -f "$ASTYLE" ] || { | 39 | ([ -f "$ASTYLE" ] && "$ASTYLE" --version | grep "$ASTYLE_VERSION" >/dev/null) || { |
39 | wget -O ../astyle.tar.gz https://deb.debian.org/debian/pool/main/a/astyle/astyle_3.1.orig.tar.gz | 40 | wget -O ../astyle.tar.gz "https://deb.debian.org/debian/pool/main/a/astyle/astyle_$ASTYLE_VERSION.orig.tar.gz" |
40 | tar -xf ../astyle.tar.gz -C "$CACHEDIR" | 41 | tar -xf ../astyle.tar.gz -C "$CACHEDIR" |
42 | make -C "$CACHEDIR/astyle/build/gcc" clean | ||
41 | make -C "$CACHEDIR/astyle/build/gcc" "-j$NPROC" | 43 | make -C "$CACHEDIR/astyle/build/gcc" "-j$NPROC" |
42 | } | 44 | } |
43 | 45 | ||
@@ -77,6 +79,7 @@ travis_script() { | |||
77 | # Coverage flags. | 79 | # Coverage flags. |
78 | add_flag -fprofile-arcs -ftest-coverage | 80 | add_flag -fprofile-arcs -ftest-coverage |
79 | 81 | ||
82 | "$ASTYLE" --version | ||
80 | other/astyle/format-source . "$ASTYLE" | 83 | other/astyle/format-source . "$ASTYLE" |
81 | 84 | ||
82 | echo "Running TokTok style checker" | 85 | echo "Running TokTok style checker" |