Skip to content

Commit b622433

Browse files
committed
chore: enabling more warnings (#499)
1 parent 7cc7e48 commit b622433

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

ben-bot/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (BENBOT_IPO)
3131
set_target_properties (ben_bot PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
3232
endif ()
3333

34-
add_feature_info (benbot_ipo BENBOT_IPO "Enable IPO/LTO")
34+
add_feature_info (benbot_ipo BENBOT_IPO "Interprocedural optimization for BenBot")
3535

3636
#
3737

config/cmake/Coverage.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include (FeatureSummary)
1818

1919
add_feature_info (
2020
coverage [[CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32]]
21-
"Enabled coverage reporting flags for debug configurations"
21+
"Coverage reporting flags for debug configurations"
2222
)
2323

2424
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32)

config/cmake/Warnings.cmake

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
4444
-Wconversion
4545
-Werror=format-security
4646
-Wextra
47-
-Wformat
4847
-Wformat=2
4948
-Woverloaded-virtual
5049
-Wimplicit-fallthrough
@@ -76,12 +75,14 @@ endif ()
7675
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
7776
add_compile_options (
7877
--extra-warnings
79-
-fcolor-diagnostics
8078
-Wbool-conversion
8179
-Wconditional-uninitialized
8280
-Wconstant-conversion
81+
-Wdouble-promotion
8382
-Wextra-semi
8483
-Wint-conversion
84+
-Wnull-dereference
85+
-Wold-style-cast
8586
-Wnullable-to-nonnull-conversion
8687
-Wshadow-all
8788
-Wshift-sign-overflow
@@ -90,22 +91,23 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
9091
-Weverything
9192
)
9293

93-
if (WIN32)
94-
add_compile_options (-Wno-reserved-macro-identifier)
95-
endif ()
96-
9794
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 21)
9895
add_compile_options (-Wno-nrvo)
9996
endif ()
10097
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
10198
add_compile_options (
10299
-Waggressive-loop-optimizations
100+
-Wduplicated-branches
101+
-Wduplicated-cond
102+
-Wmisleading-indentation
103+
-Wlogical-op
103104
-Wpointer-arith
104105
-Wredundant-decls
105106
-Wwrite-strings
106107
-Wdelete-non-virtual-dtor
107108
-Wsuggest-override
108109
-Wtrampolines
110+
-Wuseless-cast
109111
-Wbidi-chars=any
110112
#
111113
-Wno-attributes

libbenbot/src/engine/Bench.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ namespace {
111111
search::Callbacks {
112112
.onSearchStart = nullptr,
113113
.onSearchComplete = [this](const SearchResult& res) { print_info(res); result = res; },
114-
.onIteration = [this](const SearchResult& res) { print_info(res); }
114+
.onIteration = [this](const SearchResult& res) { print_info(res); },
115+
.onRootMove = nullptr
115116
}
116117
};
117118
// clang-format on

0 commit comments

Comments
 (0)