IFF: fix compilation warnings

This commit is contained in:
Mirco Miranda
2026-02-09 08:25:10 +01:00
committed by Albert Astals Cid
parent 263b5a88e2
commit f4b91d8a54

View File

@ -2538,7 +2538,7 @@ static QByteArray decompressVdat(const QByteArray &comp)
static QByteArray vdatToIlbmPlane(const QByteArray &vdatData, const BMHDChunk *header) static QByteArray vdatToIlbmPlane(const QByteArray &vdatData, const BMHDChunk *header)
{ {
QByteArray ba(vdatData.size(), char()); QByteArray ba(vdatData.size(), char());
auto rowLen = header->rowLen(); auto rowLen = qint32(header->rowLen());
for (auto x = 0, n = 0; x < rowLen; x += 2) { for (auto x = 0, n = 0; x < rowLen; x += 2) {
for (auto y = 0, off = x, h = header->height(); y < h; y++, off += rowLen) { for (auto y = 0, off = x, h = header->height(); y < h; y++, off += rowLen) {
if ((off + 1 >= ba.size()) || n + 1 >= vdatData.size()) { if ((off + 1 >= ba.size()) || n + 1 >= vdatData.size()) {
@ -2844,7 +2844,7 @@ bool PLTEChunk::isValid() const
if (dataBytes() < 4) { if (dataBytes() < 4) {
return false; return false;
} }
if (dataBytes() - 4 < total() * 3) { if (dataBytes() - 4 < quint32(total()) * 3) {
return false; return false;
} }
return chunkId() == PLTEChunk::defaultChunkId(); return chunkId() == PLTEChunk::defaultChunkId();