From 4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 14 Jun 2016 17:06:50 +0100 Subject: Use 'size_t' instead of int as appropriate. This silences the many warnings we get when building for x64 in windows. This does not address any of the warnings we get in thirdparty libraries - in particular harfbuzz. These look (at a quick glance) harmless though. --- source/fitz/stream-read.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/fitz/stream-read.c') diff --git a/source/fitz/stream-read.c b/source/fitz/stream-read.c index 2ace7b1f..b499d68f 100644 --- a/source/fitz/stream-read.c +++ b/source/fitz/stream-read.c @@ -2,10 +2,10 @@ #define MIN_BOMB (100 << 20) -int -fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, int len) +size_t +fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, size_t len) { - int count, n; + size_t count, n; count = 0; do @@ -29,9 +29,9 @@ fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, int len) static unsigned char skip_buf[4096]; -int fz_skip(fz_context *ctx, fz_stream *stm, int len) +size_t fz_skip(fz_context *ctx, fz_stream *stm, size_t len) { - int count, l, total = 0; + size_t count, l, total = 0; while (len) { @@ -48,16 +48,16 @@ int fz_skip(fz_context *ctx, fz_stream *stm, int len) } fz_buffer * -fz_read_all(fz_context *ctx, fz_stream *stm, int initial) +fz_read_all(fz_context *ctx, fz_stream *stm, size_t initial) { return fz_read_best(ctx, stm, initial, NULL); } fz_buffer * -fz_read_best(fz_context *ctx, fz_stream *stm, int initial, int *truncated) +fz_read_best(fz_context *ctx, fz_stream *stm, size_t initial, int *truncated) { fz_buffer *buf = NULL; - int n; + size_t n; fz_var(buf); @@ -110,7 +110,7 @@ fz_read_best(fz_context *ctx, fz_stream *stm, int initial, int *truncated) } char * -fz_read_line(fz_context *ctx, fz_stream *stm, char *mem, int n) +fz_read_line(fz_context *ctx, fz_stream *stm, char *mem, size_t n) { char *s = mem; int c = EOF; -- cgit v1.2.3