File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ if(NOT MSVC)
113113 add_compile_options ($<$<COMPILE_LANGUAGE:CXX>:-Wno-ignored-qualifiers>)
114114endif ()
115115
116+ if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
117+ add_compile_options ($<$<COMPILE_LANGUAGE:CXX>:-Wsign-compare>)
118+ endif ()
119+
116120add_compile_options ($<$<COMPILE_LANGUAGE:CXX>:-ftemplate-depth-1024>)
117121
118122# Because Boost can't be bothered to not include its own deprecated headers
Original file line number Diff line number Diff line change @@ -158,12 +158,12 @@ class ErasureCodeDummyImpl : public ErasureCodeInterface {
158158 // for each missing shard.
159159 for (auto a : available) {
160160 minimum_set.insert (a);
161- if (minimum_set.size () == data_chunk_count) {
161+ if (std::cmp_equal ( minimum_set.size (), data_chunk_count) ) {
162162 break ;
163163 }
164164 }
165165
166- if (minimum_set.size () != data_chunk_count) {
166+ if (std::cmp_not_equal ( minimum_set.size (), data_chunk_count) ) {
167167 minimum_set.clear ();
168168 return -EIO; // Cannot recover.
169169 }
@@ -174,7 +174,6 @@ class ErasureCodeDummyImpl : public ErasureCodeInterface {
174174 }
175175 return 0 ;
176176 }
177-
178177 [[deprecated]]
179178 int minimum_to_decode (const std::set<int > &want_to_read,
180179 const std::set<int > &available,
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ class TestPg : public PgScrubBeListener {
118118 }
119119
120120 for (shard_id_t i; i < get_ec_sinfo ().get_k (); ++i) {
121- for (int j = 0 ; j < get_ec_sinfo ().get_chunk_size (); j++) {
121+ for (int j = 0 ; std::cmp_less (j, get_ec_sinfo ().get_chunk_size () ); j++) {
122122 encode_map.at (i).c_str ()[j] =
123123 chunks[j + (get_ec_sinfo ().get_chunk_size () * i.id )];
124124 for (shard_id_t k{static_cast <int8_t >(get_ec_sinfo ().get_k_plus_m ())};
You can’t perform that action at this time.
0 commit comments