2018.11.30 09:53 "[Tiff] TIFF mailing list migrated to @lists.osgeo.org", by Even Rouault

2018.12.03 14:29 "Re: [Tiff] WIN64 : cast to or from pointer warning", by Bob Friesenhahn

in tif_win32.c there are 3 warnings about conversion to or from a pointer

usually, a way to fix this is to cast uintptr_t or intptr_t:

1)

tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */

This is a long-standing issue. Unfortunately, applying a cast does not solve the underlying problem that the required storage type does not fit in the size which is actually passed.

Fixing the problem requires changing the involved ABI (impacting using applications) since either a pointer needs to be passed, or a larger storage type needs to be used.

Thus far it seems that Windows only uses the lower range of its handle type.

An alternative is to use tif_unix.c.

Also, in iptcutil.c there is the same kind of warnings because cast to long are done, but on WIN64 long has a size of 4 bytes, not 8. Use ptrdiff_t instead of long in that case as you are doing pointer arithmetic

Please send us a source patch for this.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
_______________________________________________
Tiff mailing list

Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff