summaryrefslogtreecommitdiff
path: root/source/fitz/load-tiff.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/fitz/load-tiff.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/fitz/load-tiff.c')
-rw-r--r--source/fitz/load-tiff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index a2c081ca..60b0e8a6 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -377,7 +377,7 @@ tiff_decode_data(fz_context *ctx, struct tiff *tiff, unsigned char *rp, unsigned
fz_throw(ctx, FZ_ERROR_GENERIC, "unknown TIFF compression: %d", tiff->compression);
}
- size = fz_read(ctx, stm, wp, wlen);
+ size = (unsigned)fz_read(ctx, stm, wp, wlen);
}
fz_always(ctx)
{
@@ -471,8 +471,8 @@ tiff_paste_subsampled_tile(fz_context *ctx, struct tiff *tiff, unsigned char *ti
unsigned char *src = tile;
unsigned char *dst;
- int x, y, w, h; /* coordinates and dimensions of entire image */
- int sx, sy, sw, sh; /* coordinates and dimensions of a single subsample region, i.e. max 4 x 4 samples */
+ unsigned x, y, w, h; /* coordinates and dimensions of entire image */
+ unsigned sx, sy, sw, sh; /* coordinates and dimensions of a single subsample region, i.e. max 4 x 4 samples */
int k;
int offsets[4 * 4 * 3]; /* for a pixel position, these point to all pixel components in a subsample region */
int *offset = offsets;
@@ -583,7 +583,7 @@ tiff_decode_tiles(fz_context *ctx, struct tiff *tiff)
unsigned int offset = tiff->tileoffsets[tile];
unsigned int rlen = tiff->tilebytecounts[tile];
unsigned char *rp = tiff->bp + offset;
- int decoded;
+ unsigned decoded;
if (offset > (unsigned)(tiff->ep - tiff->bp))
fz_throw(ctx, FZ_ERROR_GENERIC, "invalid tile offset %u", offset);
@@ -1035,7 +1035,7 @@ tiff_read_ifd(fz_context *ctx, struct tiff *tiff)
static void
tiff_ycc_to_rgb(fz_context *ctx, struct tiff *tiff)
{
- int x, y;
+ unsigned x, y;
for (y = 0; y < tiff->imagelength; y++)
{