Index: src/OFDeflateStream.m ================================================================== --- src/OFDeflateStream.m +++ src/OFDeflateStream.m @@ -104,11 +104,11 @@ return false; } stream->_byte = stream->_buffer[0]; stream->_bufferIndex = 1; - stream->_bufferLength = length; + stream->_bufferLength = (uint_fast16_t)length; } stream->_bitIndex = 0; } @@ -296,13 +296,13 @@ - (size_t)lowlevelReadIntoBuffer: (void*)buffer_ length: (size_t)length { uint8_t *buffer = buffer_; - uint_fast16_t bits; + uint_fast16_t bits, i, tmp; uint16_t value; - size_t i, tmp, bytesWritten = 0; + size_t bytesWritten = 0; uint8_t *slidingWindow; uint_fast16_t slidingWindowIndex; if (_atEndOfStream) @throw [OFReadFailedException exceptionWithStream: self @@ -387,14 +387,15 @@ #define CTX _context.uncompressed if OF_UNLIKELY (length == 0) return bytesWritten; tmp = (length < CTX.length - CTX.position - ? length : CTX.length - CTX.position); + ? (uint_fast16_t)length : CTX.length - CTX.position); - tmp = [_stream readIntoBuffer: buffer + bytesWritten - length: tmp]; + tmp = (uint_fast16_t)[_stream + readIntoBuffer: buffer + bytesWritten + length: tmp]; if OF_UNLIKELY (_slidingWindow == NULL) { _slidingWindow = [self allocMemoryWithSize: _slidingWindowMask + 1]; /* Avoid leaking data */ Index: utils/objfw-unzip.m ================================================================== --- utils/objfw-unzip.m +++ utils/objfw-unzip.m @@ -129,11 +129,11 @@ [output writeBuffer: buffer length: length]; written += length; newPercent = (written == size - ? 100 : written * 100 / size); + ? 100 : (int_fast8_t)(written * 100 / size)); if (percent != newPercent) { percent = newPercent; [of_stdout writeFormat: