-
2016.11.17 14:41 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn
-
2016.11.17 16:07 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
- 2016.11.18 02:58 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn
-
2016.11.17 16:07 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
2016.11.17 14:41 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn
I assume that this was for a 64-bit build. Most of these warnings look suspect to me. Anything involving computation of a pointer address deserves close attention.
Please check if adding (size_t) to the shifted value like
m = img->UaToAa+((size_t) a2<<8);
makes the warning go away for 32 and 64-bit builds.
The libtiff release is still "pending" but if all goes well I expect that it will no longer be pending as of Saturday the 19th.
Bob
On Wed, 16 Nov 2016, Aaron Boxer wrote:
FYI:
libtiff\tif_win32.c(242): warning C4312: 'type cast': conversion from 'int' to 'thandle_t' of greater size \libtiff\tif_win32.c(287): warning C4311: 'type cast': pointer truncation from 'thandle_t' to 'int' \libtiff\tif_win32.c(342): warning C4311: 'type cast': pointer truncation from 'thandle_t' to 'int' \libtiff\tif_dirinfo.c(724): warning C6031: Return value ignored: 'snprintf'.
\libtiff\tif_getimage.c(1443): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value. \libtiff\tif_getimage.c(1514): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value. \libtiff\tif_getimage.c(1645): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value. \libtiff\tif_getimage.c(1711): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value.
The first three already have a FIXME comment.
I doubt these cause actual bugs, but always to be warning-free.
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/