From 96cd92164ee54ff3d0fa2a70bc04f72758438f48 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 9 Apr 2020 12:08:15 +0300 Subject: [PATCH] Added gcc 10 build into travis configuration, fixed compilation errors. --- .travis.yml | 30 ++++++++++++++++++++++++++++++ dbsim/db_threads.cpp | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 757499f..cac6481 100644 --- a/.travis.yml +++ b/.travis.yml @@ -203,6 +203,36 @@ matrix: - libboost-filesystem-dev - libboost-thread-dev env: MATRIX_EVAL="CC=gcc-9 CXX=g++-9 TYPE=RelWithDebInfo STRICT=ON UNIT_TESTS=ON ASAN=OFF DBSIM=ON" + - os: linux + dist: bionic + name: "GCC 10 Debug" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-10 + - cmake + - libboost-test-dev + - libboost-program-options-dev + - libboost-filesystem-dev + - libboost-thread-dev + env: MATRIX_EVAL="CC=gcc-10 CXX=g++-10 TYPE=Debug STRICT=ON UNIT_TESTS=ON ASAN=OFF DBSIM=ON" + - os: linux + dist: bionic + name: "GCC 10 RelWithDebInfo" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-10 + - cmake + - libboost-test-dev + - libboost-program-options-dev + - libboost-filesystem-dev + - libboost-thread-dev + env: MATRIX_EVAL="CC=gcc-10 CXX=g++-10 TYPE=RelWithDebInfo STRICT=ON UNIT_TESTS=ON ASAN=OFF DBSIM=ON" - os: linux dist: trusty name: "Clang 3.6 Debug" diff --git a/dbsim/db_threads.cpp b/dbsim/db_threads.cpp index 8b8c697..a2166a2 100644 --- a/dbsim/db_threads.cpp +++ b/dbsim/db_threads.cpp @@ -125,7 +125,7 @@ namespace template static inline size_t get_key_index(const Key* key) { size_t index(reinterpret_cast(key) - 1); - assert(index >= 0 && index < key_vec.size()); + assert(index < key_vec.size()); return index; }