forked from old/legacy-imlib2
Silence a couple of sign-compare warnings
This commit is contained in:
parent
ae3d501f93
commit
381e65f567
|
@ -165,7 +165,7 @@ load2(ImlibImage * im, int load_data)
|
|||
goto quit;
|
||||
|
||||
size = statbuf.st_size;
|
||||
if (size != statbuf.st_size)
|
||||
if ((long)size != statbuf.st_size)
|
||||
goto quit;
|
||||
|
||||
if (fread(&bfh, sizeof(bfh), 1, im->fp) != 1)
|
||||
|
|
|
@ -57,18 +57,18 @@ load2(ImlibImage * im, int load_data)
|
|||
|
||||
/* Check signature */
|
||||
size = 12;
|
||||
if (read(encoded_fd, encoded_data, size) != size)
|
||||
if (read(encoded_fd, encoded_data, size) != (long)size)
|
||||
goto quit;
|
||||
if (memcmp(encoded_data + 0, "RIFF", 4) != 0 ||
|
||||
memcmp(encoded_data + 8, "WEBP", 4) != 0)
|
||||
goto quit;
|
||||
|
||||
size = stats.st_size;
|
||||
if (size != stats.st_size)
|
||||
if ((long)size != stats.st_size)
|
||||
goto quit;
|
||||
|
||||
size -= 12;
|
||||
if (read(encoded_fd, encoded_data + 12, size) != size)
|
||||
if (read(encoded_fd, encoded_data + 12, size) != (long)size)
|
||||
goto quit;
|
||||
|
||||
if (WebPGetInfo(encoded_data, stats.st_size, &im->w, &im->h) == 0)
|
||||
|
|
Loading…
Reference in New Issue