AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2016.11.17 03:33 "[Tiff] Visual Studio Warnings", by Aaron Boxer
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.18 04:19 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
2016.11.18 15:37 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
2016.11.19 02:29 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
2016.11.19 15:09 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn
2016.11.21 18:57 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer
2016.11.21 19:08 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn
2016.11.21 19:44 "Re: [Tiff] Visual Studio Warnings", by Roger Leigh
2016.11.21 21:07 "Re: [Tiff] Visual Studio Warnings", by Aaron Boxer

2016.11.18 02:58 "Re: [Tiff] Visual Studio Warnings", by Bob Friesenhahn

Aaron,

Please check again and verify that the warnings are reduced.

The warnings regarding 'thandle_t' are a known issue. I suspect that using 'tif_unix.c' rather than 'tif_win32.c' is more reliable into the future under Windows (not knowing when 64-bit Windows will use handle values beyond 32-bits) until the handle size problem is fixed.

Anyone with a useful libtiff test suite should be running it this week in order to assure that there are no regressions in libtiff.

Bob

Thanks, Bob. Yes, 64 bit build. And yes, cast to size_t does fix the warning.

On Thu, Nov 17, 2016 at 9:41 AM, Bob Friesenhahn < bfriesen@simple.dallas.tx.us> wrote:

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/