summaryrefslogtreecommitdiff
path: root/source/fitz/load-tiff.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-14 17:06:50 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-17 13:24:47 +0100
commit4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca (patch)
tree4ed45be7545229ce5d8bb124a8332b5444004b1b /source/fitz/load-tiff.c
parentc9bad4ef3e32bc799b134bc3b258f9392cf60e3e (diff)
downloadmupdf-4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca.tar.xz
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.
Diffstat (limited to 'source/fitz/load-tiff.c')
-rw-r--r--source/fitz/load-tiff.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index 292c1b87..821b64e1 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -215,7 +215,7 @@ fz_decode_tiff_jpeg(fz_context *ctx, struct tiff *tiff, fz_stream *chain, unsign
fz_stream *jpegtables = NULL;
int color_transform = -1; /* unset */
if (tiff->jpegtables && (int)tiff->jpegtableslen > 0)
- jpegtables = fz_open_memory(ctx, tiff->jpegtables, (int)tiff->jpegtableslen);
+ jpegtables = fz_open_memory(ctx, tiff->jpegtables, tiff->jpegtableslen);
if (tiff->photometric == 2 /* RGB */ || tiff->photometric == 3 /* RGBPal */)
color_transform = 0;
stm = fz_open_dctd(ctx, chain, color_transform, 0, jpegtables);
@@ -764,7 +764,7 @@ fz_swap_tiff_byte_order(unsigned char *buf, int n)
}
static void
-fz_decode_tiff_header(fz_context *ctx, struct tiff *tiff, unsigned char *buf, int len)
+fz_decode_tiff_header(fz_context *ctx, struct tiff *tiff, unsigned char *buf, size_t len)
{
unsigned version;
@@ -868,7 +868,7 @@ fz_decode_tiff_ifd(fz_context *ctx, struct tiff *tiff)
}
fz_pixmap *
-fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, int len, int subimage)
+fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, size_t len, int subimage)
{
fz_pixmap *image;
struct tiff tiff = { 0 };
@@ -932,13 +932,13 @@ fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, int len, int subimage
}
fz_pixmap *
-fz_load_tiff(fz_context *ctx, unsigned char *buf, int len)
+fz_load_tiff(fz_context *ctx, unsigned char *buf, size_t len)
{
return fz_load_tiff_subimage(ctx, buf, len, 0);
}
void
-fz_load_tiff_info_subimage(fz_context *ctx, unsigned char *buf, int len, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep, int subimage)
+fz_load_tiff_info_subimage(fz_context *ctx, unsigned char *buf, size_t len, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep, int subimage)
{
struct tiff tiff = { 0 };
@@ -970,13 +970,13 @@ fz_load_tiff_info_subimage(fz_context *ctx, unsigned char *buf, int len, int *wp
}
void
-fz_load_tiff_info(fz_context *ctx, unsigned char *buf, int len, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep)
+fz_load_tiff_info(fz_context *ctx, unsigned char *buf, size_t len, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep)
{
fz_load_tiff_info_subimage(ctx, buf, len, wp, hp, xresp, yresp, cspacep, 0);
}
int
-fz_load_tiff_subimage_count(fz_context *ctx, unsigned char *buf, int len)
+fz_load_tiff_subimage_count(fz_context *ctx, unsigned char *buf, size_t len)
{
unsigned offset;
unsigned subimage_count = 0;