summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-xref.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-11-02 20:02:40 +0000
committerRobin Watts <robin.watts@artifex.com>2016-11-03 18:10:50 +0000
commit6e2a71d0b743c105c71f88a7ed1de0851cdd90ca (patch)
tree8bd6d452d6b4686f509e6478edf13f267621d6f3 /source/pdf/pdf-xref.c
parent0289421f68b810cee600a5a047507091ff4731df (diff)
downloadmupdf-6e2a71d0b743c105c71f88a7ed1de0851cdd90ca.tar.xz
Fix signed/unsigned and size_t/int/fz_off_t warnings.
All seen in MSVC, mostly in 64bit builds.
Diffstat (limited to 'source/pdf/pdf-xref.c')
-rw-r--r--source/pdf/pdf-xref.c6
1 files changed, 3 insertions, 3 deletions
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)