LibGfx: Misc 32-bit build fixes

This commit is contained in:
Sergey Bugaev 2023-09-03 23:25:27 +03:00 committed by Andrew Kaster
parent 79022090bf
commit 8ebddc1ff6
Notes: sideshowbarker 2024-07-18 00:54:03 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ ErrorOr<BoxList> Reader::read_entire_file()
while (!m_stream->is_eof()) {
auto box_header = TRY(read_box_header(*m_stream));
BoxStream box_stream { *m_stream, box_header.contents_size };
BoxStream box_stream { *m_stream, static_cast<size_t>(box_header.contents_size) };
switch (box_header.type) {
case BoxType::FileTypeBox:

View file

@ -1333,7 +1333,7 @@ private:
auto const result = ((token << n | TRY(stream.read_bits(n))) << config.lsb_in_token) | low_bits;
VERIFY(result < (1ul << 32));
VERIFY(result < (1ull << 32));
return result;
}

View file

@ -454,7 +454,7 @@ static ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_image(ImageKind ima
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference distance out of bounds");
}
if (end - pixel < length) {
if (end - pixel < static_cast<ptrdiff_t>(length)) {
dbgln_if(WEBP_DEBUG, "invalid length, {} < {}", end - pixel, length);
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference length out of bounds");
}