diff --git a/ben-bot/CMakeLists.txt b/ben-bot/CMakeLists.txt index 2266ce45..ef6568cd 100644 --- a/ben-bot/CMakeLists.txt +++ b/ben-bot/CMakeLists.txt @@ -31,7 +31,7 @@ if (BENBOT_IPO) set_target_properties (ben_bot PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) endif () -add_feature_info (benbot_ipo BENBOT_IPO "Enable IPO/LTO") +add_feature_info (benbot_ipo BENBOT_IPO "Interprocedural optimization for BenBot") # diff --git a/config/cmake/Coverage.cmake b/config/cmake/Coverage.cmake index bb509179..446462e6 100644 --- a/config/cmake/Coverage.cmake +++ b/config/cmake/Coverage.cmake @@ -18,7 +18,7 @@ include (FeatureSummary) add_feature_info ( coverage [[CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32]] - "Enabled coverage reporting flags for debug configurations" + "Coverage reporting flags for debug configurations" ) if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32) diff --git a/config/cmake/Warnings.cmake b/config/cmake/Warnings.cmake index 68e62843..94937322 100644 --- a/config/cmake/Warnings.cmake +++ b/config/cmake/Warnings.cmake @@ -44,7 +44,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") -Wconversion -Werror=format-security -Wextra - -Wformat -Wformat=2 -Woverloaded-virtual -Wimplicit-fallthrough @@ -76,12 +75,14 @@ endif () if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options ( --extra-warnings - -fcolor-diagnostics -Wbool-conversion -Wconditional-uninitialized -Wconstant-conversion + -Wdouble-promotion -Wextra-semi -Wint-conversion + -Wnull-dereference + -Wold-style-cast -Wnullable-to-nonnull-conversion -Wshadow-all -Wshift-sign-overflow @@ -90,22 +91,23 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") -Weverything ) - if (WIN32) - add_compile_options (-Wno-reserved-macro-identifier) - endif () - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 21) add_compile_options (-Wno-nrvo) endif () elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") add_compile_options ( -Waggressive-loop-optimizations + -Wduplicated-branches + -Wduplicated-cond + -Wmisleading-indentation + -Wlogical-op -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wdelete-non-virtual-dtor -Wsuggest-override -Wtrampolines + -Wuseless-cast -Wbidi-chars=any # -Wno-attributes diff --git a/libbenbot/src/engine/Bench.cpp b/libbenbot/src/engine/Bench.cpp index d4710428..0288f279 100644 --- a/libbenbot/src/engine/Bench.cpp +++ b/libbenbot/src/engine/Bench.cpp @@ -111,7 +111,8 @@ namespace { search::Callbacks { .onSearchStart = nullptr, .onSearchComplete = [this](const SearchResult& res) { print_info(res); result = res; }, - .onIteration = [this](const SearchResult& res) { print_info(res); } + .onIteration = [this](const SearchResult& res) { print_info(res); }, + .onRootMove = nullptr } }; // clang-format on diff --git a/libutil/src/MulHi64.cpp b/libutil/src/MulHi64.cpp index 3e9956b6..b1ec0d60 100644 --- a/libutil/src/MulHi64.cpp +++ b/libutil/src/MulHi64.cpp @@ -25,7 +25,7 @@ namespace { }; auto get_hi_32_bits = [](const uint64_t value) noexcept { - return static_cast(value >> UINT64_C(32)); + return value >> UINT64_C(32); }; const auto a_lo = get_lo_32_bits(first);