Skip to content

Commit

Permalink
Fix new clang-10 warnings and further travis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Feb 23, 2020
1 parent 259e643 commit f6f001c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Expand Up @@ -5,7 +5,7 @@ addons:
apt:
packages: &default_packages
- cmake
- ninja-build
- make
- zlib1g-dev
- libbz2-dev
- vim-common
Expand All @@ -27,6 +27,7 @@ jobs:
- *default_packages
- clang-3.8
- libc++-dev
- libomp-dev
env: CC=clang-3.8 CXX=clang++-3.8 SIMD=SSE4_1
- addons:
apt:
Expand All @@ -39,17 +40,20 @@ jobs:
- clang-10
- libc++-10-dev
- libc++abi-10-dev
- libomp-10-dev
env: CC=clang-10 CXX=clang++-10 SIMD=SSE4_1
- addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-10
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *default_packages
- clang-10
- libc++-10-dev
- libc++abi-10-dev
- libomp-10-dev
- mpi-default-dev
env: MPI=1 CC=clang-10 CXX=clang++-10 SIMD=SSE4_1
- addons:
Expand Down Expand Up @@ -91,12 +95,10 @@ before_install:
script:
- |
mkdir build; cd build; \
cmake -G Ninja \
cmake \
-DHAVE_MPI="$([[ -z "$MPI" ]]; echo $?)" \
-DHAVE_${SIMD}=1 \
-DENABLE_WERROR=1 \
-DHAVE_TESTS=1 \
-DREQUIRE_OPENMP=0 .. \
|| exit 1; \
ninja || exit 1;
-DHAVE_TESTS=1 ..; \
make -j $(nproc --all);
2 changes: 1 addition & 1 deletion lib/alp/CMakeLists.txt
Expand Up @@ -40,4 +40,4 @@ add_library(alp OBJECT
sls_alp.hpp
sls_normal_distr_array.hpp
)
set_target_properties(alp PROPERTIES COMPILE_FLAGS ${MMSEQS_CXX_FLAGS} -w LINK_FLAGS ${MMSEQS_CXX_FLAGS} -w)
set_target_properties(alp PROPERTIES COMPILE_FLAGS "${MMSEQS_CXX_FLAGS} -w" LINK_FLAGS "${MMSEQS_CXX_FLAGS} -w")
4 changes: 2 additions & 2 deletions src/commons/Sequence.cpp
Expand Up @@ -154,7 +154,7 @@ std::pair<const char *, unsigned int> Sequence::getSpacedPattern(bool spaced, un
for(size_t i = 0; i < kmerSize; i++){
pattern[i]=1;
}
return std::make_pair<const char *, unsigned int>((const char *) pattern, static_cast<unsigned int>(kmerSize));
return std::make_pair<const char *, unsigned int>(const_cast<const char*>(pattern), static_cast<unsigned int>(kmerSize));

// Debug(Debug::ERROR) << "Did not find spaced pattern for kmerSize: " << kmerSize << ". \n";
// Debug(Debug::ERROR) << "Please report this bug to the developer\n";
Expand All @@ -165,7 +165,7 @@ std::pair<const char *, unsigned int> Sequence::getSpacedPattern(bool spaced, un
if (pair.second > 0) {
memcpy(pattern, pair.first, pair.second * sizeof(char));
}
return std::make_pair<const char *, unsigned int>(pattern, static_cast<unsigned int>(pair.second));
return std::make_pair<const char *, unsigned int>(const_cast<const char*>(pattern), static_cast<unsigned int>(pair.second));
#undef CASE
}

Expand Down

0 comments on commit f6f001c

Please sign in to comment.