Skip to content

Warning fixes #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions metagraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ target_compile_options(zlib
-Wno-implicit-fallthrough
-Wno-deprecated-non-prototype
-Wno-unknown-warning-option
-Wno-unused-parameter
-Wno-maybe-uninitialized
)

add_library(progress_bar STATIC
Expand Down
6 changes: 5 additions & 1 deletion metagraph/CMakeListsKMC.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 2.8.12)

project(KMC)

add_compile_options(-Wall -O3 -m64 -pthread -std=c++11)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64|arm64)")
add_compile_options(-Wall -O3 -pthread -std=c++11)
else()
add_compile_options(-Wall -O3 -m64 -pthread -std=c++11)
endif()

if(@BUILD_STATIC@)
string(APPEND CMAKE_CXX_FLAGS " -static ")
Expand Down
2 changes: 1 addition & 1 deletion metagraph/external-libraries/KMC
2 changes: 1 addition & 1 deletion metagraph/external-libraries/sdsl-lite
2 changes: 1 addition & 1 deletion metagraph/external-libraries/zlib
Submodule zlib updated 78 files
+6 −2 .github/workflows/cmake.yml
+3 −1 .github/workflows/make.yml
+19 −0 .github/workflows/rust.yml
+24 −0 .github/workflows/semgrep.yml
+4 −0 .gitignore
+42 −26 CMakeLists.txt
+27 −0 Cargo.toml
+4 −4 ChangeLog
+1 −1 FAQ
+22 −0 LICENSE
+13 −7 Makefile.in
+11 −9 README
+9 −0 README.md
+12 −27 adler32.c
+1 −1 amiga/Makefile.sas
+0 −215 as400/bndsrc
+0 −110 as400/compile.clp
+0 −115 as400/readme.txt
+0 −451 as400/zlib.inc
+52 −0 benches/bench.rs
+74 −1 chunkcopy.h
+29 −34 compress.c
+132 −23 configure
+46 −67 crc32.c
+90 −159 deflate.c
+2 −2 deflate.h
+6 −6 doc/txtvsbin.txt
+5 −0 examples/README.examples
+385 −360 examples/enough.c
+3 −3 examples/fitblk.c
+11 −11 examples/gun.c
+3 −3 examples/gzappend.c
+5 −3 examples/gzlog.c
+1 −1 examples/gzlog.h
+470 −0 examples/gznorm.c
+15 −11 examples/zlib_how.html
+164 −94 examples/zran.c
+40 −0 examples/zran.h
+1 −3 gzclose.c
+42 −38 gzguts.h
+39 −84 gzlib.c
+31 −64 gzread.c
+115 −105 gzwrite.c
+31 −40 infback.c
+20 −23 inffast.c
+1 −1 inffast.h
+61 −42 inffast_chunk.c
+22 −6 inffast_chunk.h
+104 −125 inflate.c
+6 −4 inflate.h
+13 −20 inftrees.c
+4 −4 inftrees.h
+3 −3 make_vms.com
+1 −1 msdos/Makefile.dj2
+1 −1 msdos/Makefile.emx
+1 −1 old/Makefile.emx
+1 −1 old/os2/Makefile.os2
+6 −0 rust/README.md
+125 −0 rust/build.rs
+246 −0 rust/lib.rs
+ rust/test_files/test1
+47 −78 test/example.c
+12 −11 test/infcover.c
+39 −81 test/minigzip.c
+1 −1 treebuild.xml
+79 −133 trees.c
+6 −13 uncompr.c
+0 −1 win32/Makefile.bor
+1 −6 win32/Makefile.gcc
+1 −1 win32/README-WIN32.txt
+1 −1 win32/zlib1.rc
+26 −26 zconf.h
+24 −24 zconf.h.cmakein
+24 −24 zconf.h.in
+409 −353 zlib.h
+0 −152 zlib2ansi
+21 −52 zutil.c
+44 −53 zutil.h
11 changes: 6 additions & 5 deletions metagraph/src/common/bloom_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ batch_insert_avx2(BloomFilter &bloom,
for (; hashes_begin + 4 <= hashes_end; hashes_begin += 4) {
simde__m256i block_indices
= restrict_to_mask_epi64(hashes_begin, size, block_mask_out);
const uint64_t *block_index_array = reinterpret_cast<const uint64_t*>(&block_indices);
alignas(32) uint64_t block_index_array[4];
simde_mm256_store_si256(reinterpret_cast<simde__m256i*>(block_index_array), block_indices);

if (num_hash_functions_ > 1) {
for (size_t j = 0; j < 4; ++j) {
Expand Down Expand Up @@ -211,13 +212,13 @@ batch_check_avx2(const BloomFilter &bloom,
const simde__m256i add = simde_mm256_setr_epi64x(0, 1, 2, 3);
const simde__m256i numhash = simde_mm256_set1_epi64x(num_hash_functions_);

simde__m256i block_indices;
const uint64_t *block_index_array = reinterpret_cast<const uint64_t*>(&block_indices);

// check four input elements (represented by hashes) at a time
size_t i = 0;
for (; hashes_begin + 4 <= hashes_end; hashes_begin += 4) {
block_indices = restrict_to_mask_epi64(hashes_begin, size, block_mask_out);
simde__m256i block_indices = restrict_to_mask_epi64(hashes_begin, size, block_mask_out);
alignas(32) uint64_t block_index_array[4];
simde_mm256_store_si256(reinterpret_cast<simde__m256i*>(block_index_array), block_indices);


if (num_hash_functions_ > 1) {
for (size_t j = 0; j < 4; ++j) {
Expand Down
5 changes: 2 additions & 3 deletions metagraph/src/common/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#endif

#include <boost/locale.hpp>
#include <tsl/hopscotch_map.h>
#include <sdsl/int_vector.hpp>

Expand Down Expand Up @@ -171,9 +172,7 @@ template bool load_number_vector<bool>(std::istream &in, std::vector<bool> *);
void encode_utf8(uint32_t num, std::ostream &out) {
if (num > 0x7FFFFFFF)
throw std::runtime_error("Encoding value out of range for code.");

std::string enc = std::wstring_convert<std::codecvt_utf8<char32_t>,
char32_t>().to_bytes(num);
std::string enc = boost::locale::conv::utf_to_utf<char>(std::u32string(1, num));
out.write(enc.c_str(), enc.size());
}

Expand Down
2 changes: 2 additions & 0 deletions metagraph/src/seq_io/sequence_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <fstream>
#include <thread>

#include <unistd.h>

#include "common/seq_tools/reverse_complement.hpp"
#include "common/utils/string_utils.hpp"
#include "vcf_parser.hpp"
Expand Down
4 changes: 2 additions & 2 deletions metagraph/tests/test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ TEST(Utils, TempFileCheckStateFlow) {
{
utils::TempFile tmp;
ASSERT_TRUE(tmp.ifstream().good());
EXPECT_DEBUG_DEATH(tmp.ofstream().good(), "Can't write after reading");
EXPECT_DEBUG_DEATH((void)tmp.ofstream().good(), "Can't write after reading");
}
{
utils::TempFile tmp;
ASSERT_TRUE(tmp.ofstream().good());
ASSERT_TRUE(tmp.ofstream().good());
ASSERT_TRUE(tmp.ifstream().good());
ASSERT_TRUE(tmp.ifstream().good());
EXPECT_DEBUG_DEATH(tmp.ofstream().good(), "Can't write after reading");
EXPECT_DEBUG_DEATH((void)tmp.ofstream().good(), "Can't write after reading");
}
}

Expand Down
Loading