mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-25 19:43:45 +03:00
Fixed some warnings.
This commit is contained in:
parent
9a1b6966b5
commit
168acabcb0
|
@ -413,9 +413,8 @@ ImagingIncrementalCodecRead(ImagingIncrementalCodec codec,
|
||||||
DEBUG("reading (want %llu bytes)\n", (unsigned long long)bytes);
|
DEBUG("reading (want %llu bytes)\n", (unsigned long long)bytes);
|
||||||
|
|
||||||
if (codec->stream.fd >= 0) {
|
if (codec->stream.fd >= 0) {
|
||||||
off_t offset = lseek(codec->stream.fd, 0, SEEK_CUR);
|
|
||||||
ssize_t ret = read(codec->stream.fd, buffer, bytes);
|
ssize_t ret = read(codec->stream.fd, buffer, bytes);
|
||||||
DEBUG("read %lld bytes from fd at %lld\n", (long long)ret, (long long)offset);
|
DEBUG("read %lld bytes from fd\n", (long long)ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,7 +481,7 @@ ImagingIncrementalCodecSkip(ImagingIncrementalCodec codec,
|
||||||
static const UINT8 zeroes[256] = { 0 };
|
static const UINT8 zeroes[256] = { 0 };
|
||||||
off_t done = 0;
|
off_t done = 0;
|
||||||
while (bytes) {
|
while (bytes) {
|
||||||
size_t todo = bytes > 256 ? 256 : bytes;
|
size_t todo = (size_t)(bytes > 256 ? 256 : bytes);
|
||||||
ssize_t written = ImagingIncrementalCodecWrite(codec, zeroes, todo);
|
ssize_t written = ImagingIncrementalCodecWrite(codec, zeroes, todo);
|
||||||
if (written <= 0)
|
if (written <= 0)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user