From e1a0ad2791fca8fbc03ec2751d4cb2f121f9d9e6 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 20 Sep 2016 13:09:13 +0100 Subject: Avoid signed/unsigned warnings. --- source/fitz/unzip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/fitz/unzip.c') diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c index 3c5c0da4..cb9ccc40 100644 --- a/source/fitz/unzip.c +++ b/source/fitz/unzip.c @@ -140,7 +140,7 @@ static void read_zip_dir_imp(fz_context *ctx, fz_zip_archive *zip, int start_off name = fz_malloc(ctx, namesize + 1); n = fz_read(ctx, file, (unsigned char*)name, namesize); - if (n < namesize) + if (n < (size_t)namesize) fz_throw(ctx, FZ_ERROR_GENERIC, "premature end of data in zip entry name"); name[namesize] = '\0'; @@ -300,7 +300,7 @@ static fz_buffer *read_zip_entry(fz_context *ctx, fz_archive *arch, const char * fz_try(ctx) { ubuf->len = fz_read(ctx, file, ubuf->data, ent->usize); - if (ubuf->len < ent->usize) + if (ubuf->len < (size_t)ent->usize) fz_warn(ctx, "premature end of data in stored zip archive entry"); } fz_catch(ctx) -- cgit v1.2.3