diff --git a/src/decoder/plugins/DsdiffDecoderPlugin.cxx b/src/decoder/plugins/DsdiffDecoderPlugin.cxx index 72c0917fd..38d092459 100644 --- a/src/decoder/plugins/DsdiffDecoderPlugin.cxx +++ b/src/decoder/plugins/DsdiffDecoderPlugin.cxx @@ -387,7 +387,7 @@ dsdiff_decode_chunk(DecoderClient &client, InputStream &is, /* see how much aligned data from the remaining chunk fits into the local buffer */ size_t now_size = buffer_size; - if (remaining_bytes < (offset_type)now_size) { + if (std::cmp_less(remaining_bytes, now_size)) { unsigned now_frames = remaining_bytes / frame_size; now_size = now_frames * frame_size; } diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index 185319d02..599aaf799 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -109,7 +109,7 @@ AsyncInputStream::Seek(std::unique_lock &lock, break; const size_t nbytes = - new_offset - offset < (offset_type)r.size() + std::cmp_less(new_offset - offset, r.size()) ? new_offset - offset : r.size(); diff --git a/src/input/RewindInputStream.cxx b/src/input/RewindInputStream.cxx index 6b0147a83..600d06a69 100644 --- a/src/input/RewindInputStream.cxx +++ b/src/input/RewindInputStream.cxx @@ -82,7 +82,7 @@ RewindInputStream::Read(std::unique_lock &lock, size_t nbytes = input->Read(lock, ptr, read_size); - if (input->GetOffset() > (offset_type)sizeof(buffer)) + if (std::cmp_greater(input->GetOffset(), sizeof(buffer))) /* disable buffering */ tail = 0; else if (tail == (size_t)offset) {