From 0cd82ffc9286111c4edb19f83902213c804d3900 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 27 May 2024 09:18:59 +0200 Subject: [PATCH 1/2] Also compile pedantically with clang --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d2555bc..b5dd74f 100644 --- a/tox.ini +++ b/tox.ini @@ -35,8 +35,10 @@ deps= skip_install=True setenv= CFLAGS=-Wall -Werror -Wpedantic +allowlist_externals = bash commands = - python setup.py build_ext -f + bash -c 'CC=gcc python setup.py build_ext -f' + bash -c 'CC=clang python setup.py build_ext -f' [flake8] max-line-length=88 From 0861513782244edf39ab4c75d542332f49fd0acd Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 27 May 2024 09:20:19 +0200 Subject: [PATCH 2/2] Fix clang pedantic errors --- src/sequali/function_dispatch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sequali/function_dispatch.h b/src/sequali/function_dispatch.h index 3349558..7c821ee 100644 --- a/src/sequali/function_dispatch.h +++ b/src/sequali/function_dispatch.h @@ -206,7 +206,7 @@ static int64_t sequence_to_canonical_kmer_default(uint8_t *sequence, uint64_t k) kmer <<= 8; kmer |= kchunk; } - for (i=i; i<(int64_t)k; i++) { + for (; i<(int64_t)k; i++) { size_t nuc = NUCLEOTIDE_TO_TWOBIT[sequence[i]]; all_nucs |= nuc; kmer <<= 2; @@ -378,4 +378,4 @@ static int64_t (*sequence_to_canonical_kmer)( static inline int64_t sequence_to_canonical_kmer(uint8_t *sequence, uint64_t k) { return sequence_to_canonical_kmer_default(sequence, k); } -#endif \ No newline at end of file +#endif