From 6e2a71d0b743c105c71f88a7ed1de0851cdd90ca Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 2 Nov 2016 20:02:40 +0000 Subject: Fix signed/unsigned and size_t/int/fz_off_t warnings. All seen in MSVC, mostly in 64bit builds. --- source/pdf/pdf-xref.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/pdf/pdf-xref.c') diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index 2c964e90..41dd9984 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -635,7 +635,7 @@ pdf_xref_size_from_old_trailer(fz_context *ctx, pdf_document *doc, pdf_lexbuf *b int size; fz_off_t ofs; pdf_obj *trailer = NULL; - int n; + size_t n; fz_var(trailer); @@ -683,10 +683,10 @@ pdf_xref_size_from_old_trailer(fz_context *ctx, pdf_document *doc, pdf_lexbuf *b else n = 20; - if (len > (FZ_OFF_MAX - t) / n) + if (len > (fz_off_t)((FZ_OFF_MAX - t) / n)) fz_throw(ctx, FZ_ERROR_GENERIC, "xref has too many entries"); - fz_seek(ctx, doc->file, t + n * len, SEEK_SET); + fz_seek(ctx, doc->file, (fz_off_t)(t + n * len), SEEK_SET); } fz_try(ctx) -- cgit v1.2.3