From f6bca3f994d5a07ec995270e7c69cb6bdbc5d3b1 Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Fri, 18 Jan 2013 21:37:13 +0000 Subject: [PATCH] avoid warnings on MSVC (bug 2427) --- ChangeLog | 5 +++++ libtiff/tif_read.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c97c146..4b776fc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-01-18 Frank Warmerdam + + * libtiff/tif_read.c: uint64/tmsize_t change for MSVC warnings. + http://bugzilla.maptools.org/show_bug.cgi?id=2427 + 2012-12-20 Tom Lane * test/raw_decode.c: Relax raw_decode's pixel-value checks so that diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c index fe36e683..acca0b85 100644 --- a/libtiff/tif_read.c +++ b/libtiff/tif_read.c @@ -1,4 +1,4 @@ -/* $Id: tif_read.c,v 1.41 2012-07-06 19:22:58 bfriesen Exp $ */ +/* $Id: tif_read.c,v 1.42 2013-01-18 21:37:13 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -47,7 +47,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) { static const char module[] = "TIFFFillStripPartial"; register TIFFDirectory *td = &tif->tif_dir; - uint64 unused_data; + tmsize_t unused_data; uint64 read_offset; tmsize_t cc, to_read; /* tmsize_t bytecountm; */ @@ -117,7 +117,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) if( (uint64) to_read > td->td_stripbytecount[strip] - tif->tif_rawdataoff - tif->tif_rawdataloaded ) { - to_read = td->td_stripbytecount[strip] + to_read = (tmsize_t) td->td_stripbytecount[strip] - tif->tif_rawdataoff - tif->tif_rawdataloaded; }