From b1cc9cf57e6bc6869bd976e3bdf8b084ca9c25ce Mon Sep 17 00:00:00 2001 From: Lucas Czech Date: Mon, 28 Oct 2024 17:19:30 +0100 Subject: [PATCH] Fix minor issues found in CI runs --- CMakeLists.txt | 3 ++- lib/genesis/utils/math/statistics.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 705d034c..82d2ec85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,7 +274,8 @@ if (MSVC OR (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")) else () # For other operating systems, set the warn flags to a very high level - except unknown pragmas, # as this causes needless warnings with OpenMP and other pragma-based techniques. - set (WARN_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -pedantic -pedantic-errors") + set( WARN_FLAGS "-Wall -Wextra -pedantic -pedantic-errors" ) + set( WARN_FLAGS "${WARN_FLAGS} -Wno-unknown-pragmas -Wno-unknown-attributes" ) # Furthermore, in debug mode, we also want all warnings to be errors, so that we do not miss them # In release, this might hinder users to successfully build genesis if any warnings remain diff --git a/lib/genesis/utils/math/statistics.hpp b/lib/genesis/utils/math/statistics.hpp index 5e448c69..67073942 100644 --- a/lib/genesis/utils/math/statistics.hpp +++ b/lib/genesis/utils/math/statistics.hpp @@ -347,7 +347,7 @@ inline void closure( std::vector& vec ) template double shannon_entropy( ForwardIterator first, ForwardIterator last, double log_base = 2.0) { - using T = ForwardIterator::value_type; + using T = typename ForwardIterator::value_type; // Use uint64_t for integral types, and compensated summation for floating-point types, // to avoid overflow, and get maximum accuracy.