From 2f6364ea4b54a1ff337d0e5168454c4949e3fd8a Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 20 Nov 2018 10:05:07 +0100 Subject: travis: switch from Ubuntu 14.04 to 16.04 Travis is phasing out its support for containers, so we remove the `sudo: false`, which will be a no-op soon. Reference: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration Changes for Linux: - Xenial comes with libtool installed already. It only provides "libtoolize", though. For "libtool" we need to install libtool-bin. --- .travis.yml | 8 ++++---- ci/install.sh | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ad9d7a6fb..7674ecb0c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -dist: trusty -sudo: false +dist: xenial + language: c env: @@ -96,9 +96,9 @@ before_cache: ci/before_cache.sh addons: apt: packages: + - apport - autoconf - automake - - apport - build-essential - clang - cmake @@ -108,7 +108,7 @@ addons: - gdb - language-pack-tr - libc6-dev-i386 - - libtool + - libtool-bin - locales - ninja-build - pkg-config diff --git a/ci/install.sh b/ci/install.sh index 4aefe22fb5..7efbaf33b5 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -8,10 +8,8 @@ if [[ "${CI_TARGET}" == lint ]]; then fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - brew install ninja - brew install gettext - brew reinstall libtool brew install ccache + brew install ninja export PATH="/usr/local/opt/ccache/libexec:$PATH" fi -- cgit From fc0aeb5f88eccb4c816ba68bfa2902d621067c4e Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 20 Nov 2018 12:17:49 +0100 Subject: xenial: fix clang error messages * Remove FUNC_ATTR_NONNULL_ALL from function without pointer arguments. Otherwise the ASAN build would complain: error: 'nonnull' attribute applied to function with no pointer arguments [-Werror,-Wignored-attributes] static void do_autocmd_focusgained(_Bool gained) __attribute__((nonnull)); --- src/nvim/aucmd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nvim/aucmd.c b/src/nvim/aucmd.c index fc421116ea..9ad3414b79 100644 --- a/src/nvim/aucmd.c +++ b/src/nvim/aucmd.c @@ -26,7 +26,6 @@ void aucmd_schedule_focusgained(bool gained) } static void do_autocmd_focusgained(bool gained) - FUNC_ATTR_NONNULL_ALL { static bool recursive = false; -- cgit From 02d68fbcae8b97e41aff4dbb40c64994b37dd65a Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 20 Nov 2018 20:08:41 -0500 Subject: Remove extraneous parens to silence -Wparentheses-equality In file included from ../src/nvim/eval/encode.c:974: ../src/nvim/eval/typval_encode.c.h:390:40: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] do { if ((tv->vval.v_special == kSpecialVarTrue)) { msgpack_pack_true(packer); } else { msgpack_pack_false(packer); } } while (0); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ --- src/nvim/eval/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 2563e38258..e9ab6cd3e2 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -933,7 +933,7 @@ char *encode_tv2json(typval_T *tv, size_t *len) #define TYPVAL_ENCODE_CONV_BOOL(tv, num) \ do { \ - if ((num)) { \ + if (num) { \ msgpack_pack_true(packer); \ } else { \ msgpack_pack_false(packer); \ -- cgit From 2cbac719c3eba8ea5826e16912126d70222911ed Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 20 Nov 2018 20:22:42 -0500 Subject: Downgrade to clang-4.0 to avoid false-positive warnings from clang * -Wtautological-compare error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] for (win_T *wp = ((curtab) == curtab) ? firstwin : (curtab)->tp_firstwin; wp != ((void*)0); wp = wp->w_next) { * -Wconversion error: implicit conversion loses floating-point precision: 'const float_T' (aka 'const double') to 'float' [-Werror,-Wconversion] do { const float_T flt_ = (tv->vval.v_float); switch ((sizeof (flt_) == sizeof (float) ? __fpclassifyf (flt_) : sizeof (flt_) == sizeof (double) ? __fpclassify (flt_) : __fpclassifyl (flt_))) { case 0: { ga_concat(gap, (char_u *)(char_u *) "str2float('nan')"); break; } case 1: { if (flt_ < 0) { ga_append(gap, '-'); } ga_concat(gap, (char_u *)(char_u *) "str2float('inf')"); break; } default: { char numbuf[NUMBUFLEN]; vim_snprintf(numbuf, ((sizeof(numbuf)/sizeof((numbuf)[0])) / ((size_t)(!(sizeof(numbuf) % sizeof((numbuf)[0]))))), "%g", flt_); ga_concat(gap, (char_u *)(char_u *) numbuf); } } } while (0); ~~~~~~~~~~~~~ ^~~~ --- .travis.yml | 6 ++++-- ci/common/test.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7674ecb0c2..d8ce0544af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ env: - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan" - TSAN_OPTIONS="log_path=$LOG_DIR/tsan" - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" + - ASAN_SYMBOLIZE=asan_symbolize # Environment variables for Valgrind. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log" # If this file exists, the cache is valid (compile was successful). @@ -50,11 +51,12 @@ jobs: include: - stage: normal builds os: linux - compiler: clang + compiler: clang-4.0 env: > CLANG_SANITIZER=ASAN_UBSAN # Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6 CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON" + ASAN_SYMBOLIZE=asan_symbolize-4.0 sudo: true - os: linux compiler: gcc @@ -100,7 +102,7 @@ addons: - autoconf - automake - build-essential - - clang + - clang-4.0 - cmake - cscope - g++-multilib diff --git a/ci/common/test.sh b/ci/common/test.sh index a6afd1df4c..f1c5454e3f 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -83,7 +83,7 @@ valgrind_check() { asan_check() { if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then - check_logs "${1}" "*san.*" | asan_symbolize + check_logs "${1}" "*san.*" | $ASAN_SYMBOLIZE fi } -- cgit