Silence a couple of sign-compare warnings

This commit is contained in:
Kim Woelders 2020-12-08 21:02:38 +01:00
parent ae3d501f93
commit 381e65f567
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)