2018.12.03 04:19 "[Tiff] WIN64 : cast to or from pointer warning", by Vincent Torri
Hello
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 */
i would do:
tif = TIFFClientOpen(name, mode, (thandle_t)(uintptr_t)ifd,
2)
tif = TIFFFdOpen((int)fd, name, mode); /* FIXME: WIN64 cast from
pointer to int warning */
I would do
tif = TIFFFdOpen((int)(intptr_t)fd, name, mode);
3)
tif = TIFFFdOpen((int)fd, /* FIXME: WIN64 cast from pointer to int warning */
same cast than 2)
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
regards
Vincent Torri