vcpkg/ports/libavif/fix-compiler-warnings.patch

23 lines
1.1 KiB
Diff
Raw Normal View History

diff --git a/src/read.c b/src/read.c
index e45db4e..0ddb05a 100644
--- a/src/read.c
+++ b/src/read.c
@@ -945,7 +945,7 @@ static avifResult avifDecoderItemMaxExtent(const avifDecoderItem * item, const a
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
startOffset += remainingOffset;
- extentSize -= remainingOffset;
+ extentSize -= (size_t)remainingOffset;
remainingOffset = 0;
}
}
@@ -3147,7 +3147,7 @@ static avifResult avifDecoderPrepareSample(avifDecoder * decoder, avifDecodeSamp
if ((decoder->io->sizeHint > 0) && (sample->offset > decoder->io->sizeHint)) {
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
- avifResult readResult = decoder->io->read(decoder->io, 0, sample->offset, bytesToRead, &sampleContents);
+ avifResult readResult = decoder->io->read(decoder->io, 0, (size_t)sample->offset, bytesToRead, &sampleContents);
if (readResult != AVIF_RESULT_OK) {
return readResult;
}