Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx5.public.one.com ([10.246.18.25])
	by mail6.local.one.com (Dovecot) with LMTP id oVI5BO8VL1guzgEAsyOMew
	for <filtered@awaresystems.be>; Fri, 18 Nov 2016 15:58:37 +0000
X-HalOne-ID: dce1d12c-ada7-11e6-b6aa-b82a72d82f61
Received: from mail-oi0-f54.google.com (unknown [209.85.218.54])
	by mx5.public.one.com (Halon Mail Gateway) with ESMTPS
	for <filtered@awaresystems.be>; Fri, 18 Nov 2016 15:58:35 +0000 (UTC)
Received: by mail-oi0-f54.google.com with SMTP id z62so92860223oiz.1
        for <filtered@awaresystems.be>; Fri, 18 Nov 2016 07:58:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:mime-version:sender:errors-to;
        bh=gvk5NbjZhUbZmJNV1x/P40qnybKgpIH1HfO8wZMtcg0=;
        b=M6DodDiC+W4tDLTMsZS0/l7XmDGoaSbBm/wWIfxoOqPskOEepsnyLB+8qWHMlow1qS
         hH9VJzPHempl2MezaEytgQnz14WfI0wVajGFvb86RgGhg5uu/qBo4tt9f7+reTWZB19L
         fymrP91NyXauFIQVZ6m2ZQ3V/r69yRuiXk0UONz19PPt775EXoIafOIDfCn7CQZI5BwV
         Eqv4CuVDuj/Rc3QL0nNfO+CNuKlTTlE2HdRzrl+DZDJI33FzF40gOGhHYKBIYsnUipNN
         cdEkbbVj3DnYIHuSuGebnakuQkRXD62IYwATNYcS3CbGDmyi5FkAszUhZGtuGZ7PCT2x
         9hWw==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AKaTC00R//7kxJE/7EunS1HeNCTRHZ/v+Wtq9+CV2SnRXRkc6PqWnM9IKh71esQZYesX1k0B94L9DBkGuUljhoXvapn5xks=
X-Received: by 10.202.228.83 with SMTP id b80mr264050oih.214.1479484712974;
        Fri, 18 Nov 2016 07:58:32 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.192.135 with SMTP id q129csp189200oif;
        Fri, 18 Nov 2016 07:58:31 -0800 (PST)
X-Received: by 10.28.196.67 with SMTP id u64mr843150wmf.45.1479484711434;
        Fri, 18 Nov 2016 07:58:31 -0800 (PST)
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id c6si8050114wju.259.2016.11.18.07.58.29;
        Fri, 18 Nov 2016 07:58:31 -0800 (PST)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 8F04F35C064;
	Fri, 18 Nov 2016 10:57:42 -0500 (EST)
Received: from mail-qt0-f169.google.com (mail-qt0-f169.google.com
	[209.85.216.169])
	by lists.maptools.org (Postfix) with ESMTPS id 4C7EE35C062
	for <tiff@lists.maptools.org>; Fri, 18 Nov 2016 10:37:59 -0500 (EST)
Received: by mail-qt0-f169.google.com with SMTP id p16so157168136qta.0
	for <tiff@lists.maptools.org>; Fri, 18 Nov 2016 07:37:59 -0800 (PST)
X-Received: by 10.237.36.170 with SMTP id t39mr196458qtc.115.1479483478785;
	Fri, 18 Nov 2016 07:37:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.140.39.180 with HTTP; Fri, 18 Nov 2016 07:37:58 -0800 (PST)
In-Reply-To: <CAK8GPyBoRJ8f-hLnUEn+h9pqtkUswfNB8pbYdVF9_iJuA4Naqw@mail.gmail.com>
References: <CAK8GPyDHaGBiSgjL2u07aAjjrMOO3C7ZG9a9=qpPfXeB3srDQg@mail.gmail.com>
	<alpine.GSO.2.20.1611170836180.23214@freddy.simplesystems.org>
	<CAK8GPyAfwELnCZXMN1aAZWbag4ksoAOyFxw03MsbNkzQs0Z=7Q@mail.gmail.com>
	<alpine.GSO.2.20.1611172047530.23214@freddy.simplesystems.org>
	<CAK8GPyBoRJ8f-hLnUEn+h9pqtkUswfNB8pbYdVF9_iJuA4Naqw@mail.gmail.com>
From: Aaron Boxer <boxerab@gmail.com>
Date: Fri, 18 Nov 2016 10:37:58 -0500
Message-ID: <CAK8GPyDs+_zQRinEEEQ70gyBGnDK0V5cwnQV4Y77TemUkYb=Mg@mail.gmail.com>
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Visual Studio Warnings
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0032021835=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0032021835==
Content-Type: multipart/alternative; boundary=001a114035543462c605419517bc

--001a114035543462c605419517bc
Content-Type: text/plain; charset=UTF-8

Okey, dokey, the warnings are reduced. Thanks!
Aaron

On Thu, Nov 17, 2016 at 11:19 PM, Aaron Boxer <boxerab@gmail.com> wrote:

> Thanks.
> I've been getting my libtiff from this unofficial github mirror:
>
> https://github.com/vadz/libtiff
>
> Will have to wait to test until this repo gets updated with your latest
> check-ins.
>
>
>
>
> On Thu, Nov 17, 2016 at 9:58 PM, Bob Friesenhahn <
> bfriesen@simple.dallas.tx.us> wrote:
>
>> 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
>>
>>
>> On Thu, 17 Nov 2016, Aaron Boxer wrote:
>>
>>> Thanks, Bob. Yes, 64 bit build. And yes, cast to size_t does fix the
>>> warning.
>>> Aaron
>>>
>>> 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.
>>>>>
>>>>> Cheers,
>>>>> Aaron
>>>>>
>>>>>
>>>>> --
>>>> Bob Friesenhahn
>>>> bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/u
>>>> sers/bfriesen/
>>>> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
>>>>
>>>>
>>>
>> --
>> Bob Friesenhahn
>> bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/u
>> sers/bfriesen/
>> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
>>
>
>

--001a114035543462c605419517bc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Okey, dokey, the warnings are reduced. Thanks!<br></d=
iv>Aaron<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"=
>On Thu, Nov 17, 2016 at 11:19 PM, Aaron Boxer <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:boxerab@gmail.com" target=3D"_blank">boxerab@gmail.com</a>&gt;<=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>=
Thanks. <br></div>I&#39;ve been getting my libtiff from this unofficial git=
hub mirror:<br><br><a href=3D"https://github.com/vadz/libtiff" target=3D"_b=
lank">https://github.com/vadz/<wbr>libtiff</a><br><br></div>Will have to wa=
it to test until this repo gets updated with your latest check-ins.<br><br>=
<div><br><br></div></div><div class=3D"HOEnZb"><div class=3D"h5"><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Nov 17, 2016 at 9:5=
8 PM, Bob Friesenhahn <span dir=3D"ltr">&lt;<a href=3D"mailto:bfriesen@simp=
le.dallas.tx.us" target=3D"_blank">bfriesen@simple.dallas.tx.us</a>&gt;</sp=
an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">Aaron,<br>
<br>
Please check again and verify that the warnings are reduced.<br>
<br>
The warnings regarding &#39;thandle_t&#39; are a known issue.=C2=A0 I suspe=
ct that using &#39;tif_unix.c&#39; rather than &#39;tif_win32.c&#39; is mor=
e reliable into the future under Windows (not knowing when 64-bit Windows w=
ill use handle values beyond 32-bits) until the handle size problem is fixe=
d.<br>
<br>
Anyone with a useful libtiff test suite should be running it this week in o=
rder to assure that there are no regressions in libtiff.<span class=3D"m_50=
39442921118113516HOEnZb"><font color=3D"#888888"><br>
<br>
Bob</font></span><div class=3D"m_5039442921118113516HOEnZb"><div class=3D"m=
_5039442921118113516h5"><br>
<br>
On Thu, 17 Nov 2016, Aaron Boxer wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Thanks, Bob. Yes, 64 bit build. And yes, cast to size_t does fix the<br>
warning.<br>
Aaron<br>
<br>
On Thu, Nov 17, 2016 at 9:41 AM, Bob Friesenhahn &lt;<br>
<a href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@=
simple.dallas.tx.us</a>&gt; wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I assume that this was for a 64-bit build.=C2=A0 Most of these warnings loo=
k<br>
suspect to me.=C2=A0 Anything involving computation of a pointer address<br=
>
deserves close attention.<br>
<br>
Please check if adding (size_t) to the shifted value like<br>
<br>
=C2=A0 m =3D img-&gt;UaToAa+((size_t) a2&lt;&lt;8);<br>
<br>
makes the warning go away for 32 and 64-bit builds.<br>
<br>
The libtiff release is still &quot;pending&quot; but if all goes well I exp=
ect that<br>
it will no longer be pending as of Saturday the 19th.<br>
<br>
Bob<br>
<br>
<br>
On Wed, 16 Nov 2016, Aaron Boxer wrote:<br>
<br>
FYI:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
libtiff\tif_win32.c(242): warning C4312: &#39;type cast&#39;: conversion fr=
om<br>
&#39;int&#39;<br>
to &#39;thandle_t&#39; of greater size<br>
\libtiff\tif_win32.c(287): warning C4311: &#39;type cast&#39;: pointer trun=
cation<br>
from &#39;thandle_t&#39; to &#39;int&#39;<br>
\libtiff\tif_win32.c(342): warning C4311: &#39;type cast&#39;: pointer trun=
cation<br>
from &#39;thandle_t&#39; to &#39;int&#39;<br>
\libtiff\tif_dirinfo.c(724): warning C6031: Return value ignored:<br>
&#39;snprintf&#39;.<br>
\libtiff\tif_getimage.c(1443): warning C6297: Arithmetic overflow:=C2=A0 32=
-bit<br>
value is shifted, then cast to 64-bit value.=C2=A0 Results might not be an<=
br>
expected value.<br>
\libtiff\tif_getimage.c(1514): warning C6297: Arithmetic overflow:=C2=A0 32=
-bit<br>
value is shifted, then cast to 64-bit value.=C2=A0 Results might not be an<=
br>
expected value.<br>
\libtiff\tif_getimage.c(1645): warning C6297: Arithmetic overflow:=C2=A0 32=
-bit<br>
value is shifted, then cast to 64-bit value.=C2=A0 Results might not be an<=
br>
expected value.<br>
\libtiff\tif_getimage.c(1711): warning C6297: Arithmetic overflow:=C2=A0 32=
-bit<br>
value is shifted, then cast to 64-bit value.=C2=A0 Results might not be an<=
br>
expected value.<br>
<br>
The first three already have a FIXME comment.<br>
<br>
I doubt these cause actual bugs, but always to be warning-free.<br>
<br>
Cheers,<br>
Aaron<br>
<br>
<br>
</blockquote>
--<br>
Bob Friesenhahn<br>
<a href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@=
simple.dallas.tx.us</a>, <a href=3D"http://www.simplesystems.org/users/bfri=
esen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesystems.org/u<=
wbr>sers/bfriesen/</a><br>
GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.GraphicsMagic=
k.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMagick.org/=
</a><br>
<br>
</blockquote>
<br>
</blockquote>
<br>
-- <br>
Bob Friesenhahn<br>
<a href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@=
simple.dallas.tx.us</a>, <a href=3D"http://www.simplesystems.org/users/bfri=
esen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesystems.org/u<=
wbr>sers/bfriesen/</a><br>
GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.GraphicsMagic=
k.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMagick.org/=
</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a114035543462c605419517bc--

--===============0032021835==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0032021835==--
