AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.06.17 22:10 "libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.18 02:38 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Bob Friesenhahn
2010.06.18 13:18 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.18 14:16 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Olivier Paquet
2010.06.21 21:20 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.21 23:05 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Adam Goode
2010.06.18 18:39 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Bob Friesenhahn
2010.06.28 13:22 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.29 17:12 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Albert Cahalan
2010.06.29 18:15 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.29 18:20 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Edward Lam
2010.06.29 19:16 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Bob Friesenhahn

2010.06.29 17:12 "Re: libtiff 4.0 compiler warning on x64 in tif_read.c", by Albert Cahalan

On Thu, Jun 17, 2010 at 6:10 PM, Edward Lam <edward@sidefx.com> wrote:
> Hi,
>
> On MSVC2005 64-bit, compiling CVS HEAD gives me:
>
> tif_read.c(207) : warning C4244: '=' : conversion from 'tmsize_t' to
> 'int', possible loss of data
>
> Looking at it, it seems to me that we want "read_ahead" to be tmsize_t
> instead of int? Similarly, I think TIFFFillStripPartial() should take an
> tmsize_t instead.

It's rather doubtful, considering the purpose of the variable. Here:

// C4244 warning is more trouble than it's worth
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4244)
#endif

// code goes here

// C4244 back on
#if defined(_MSC_VER)
#pragma warning(pop)
#endif


That would be the generic case, usable in an API header file.
You can skip the push/pop for *.c files.