From: Jon Date: Thu, 21 Aug 2025 15:43:06 +0000 (+0100) Subject: erasure-code/consistency: Fixed signed-compare warning in ConsistencyChecker X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1aff7462fb0de33009c4dadc61fc5231374efcf0;p=ceph.git erasure-code/consistency: Fixed signed-compare warning in ConsistencyChecker Signed-off-by: Jon Bailey --- diff --git a/src/erasure-code/consistency/ConsistencyChecker.cc b/src/erasure-code/consistency/ConsistencyChecker.cc index af41e8e3df4..3fe655b213f 100644 --- a/src/erasure-code/consistency/ConsistencyChecker.cc +++ b/src/erasure-code/consistency/ConsistencyChecker.cc @@ -122,8 +122,8 @@ bool ConsistencyChecker::check_object_consistency(const std::string& oid, ceph_assert(outbl->length() >= data_and_parity.second.length()); // We check the difference is not larger than the page size multipled by the // number of parities - ceph_assert(outbl->length() - data_and_parity.second.length() - <= (encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m()); + ceph_assert(std::cmp_less_equal(outbl->length() - data_and_parity.second.length(), + (encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m())); // We truncate the encoded parity to the size of the client read for comparison if (outbl->length() != data_and_parity.second.length()) {