Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.b-one.net (mx-h.one.com [91.198.169.55])
	by mail9.b-one.net (Postfix) with ESMTP id DE5D240024F
	for <info@awaresystems.be>; Fri, 18 Jun 2010 16:45:07 +0200 (CEST)
Received: by mx-h.b-one.net (Postfix, from userid 106)
	id D67586375799; Fri, 18 Jun 2010 16:45:07 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-h.b-one.net (Postfix) with ESMTP id 1AB2963DF7EB for
 <info@awaresystems.be>; Fri, 18 Jun 2010 16:45:07 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 377531D1AEE57; Fri, 18 Jun 2010
 09:44:13 -0500 (EST)
Received: from fg-out-1718.google.com (fg-out-1718.google.com
 [72.14.220.155]) by lists.maptools.org (Postfix) with ESMTP id BC8C01D4CC853
 for <tiff@lists.maptools.org>; Fri, 18 Jun 2010 09:16:44 -0500 (EST)
Received: by fg-out-1718.google.com with SMTP id d23so294351fga.9 for
 <tiff@lists.maptools.org>; Fri, 18 Jun 2010 07:16:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.80.5 with SMTP id h5mr328030mul.82.1276870603158; Fri, 18
  Jun 2010 07:16:43 -0700 (PDT)
Received: by 10.103.134.13 with HTTP; Fri, 18 Jun 2010 07:16:43 -0700 (PDT)
In-Reply-To: <4C1B7208.3040802@sidefx.com>
References: <4C1A9D5B.3000908@sidefx.com>
 <alpine.GSO.2.01.1006172137570.12887@freddy.simplesystems.org>
 <4C1B7208.3040802@sidefx.com>
Date: Fri, 18 Jun 2010 10:16:43 -0400
Message-ID: <AANLkTimJ6uZT6ETdVCOMk9uLFp_yBn0kKQyabI0VOJZl@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
To: Edward Lam <edward@sidefx.com>
Cc: Tiff List <tiff@lists.maptools.org>
Subject: Re: [Tiff] libtiff 4.0 compiler warning on x64 in tif_read.c
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: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Fri, Jun 18, 2010 at 9:18 AM, Edward Lam <edward@sidefx.com> wrote:
> I could go and just do blind type changes from int to tmsize_t until the

I wouldn't do it blindly just yet but it looks like both instances of
read_ahead in there should have been tmsize_t.

> compiler is satisfied but that's just a losing battle if we keep adding
> new code that has such warnings. Is there some gcc flag we can add to
> make it NOT compile such code?

Perhaps so for 64-bit gcc (couldn't find it though) but I don't think
anything can be done if the author is working on a 32-bit system where
there is nothing to warn about. We just have to deal with the fact
that different compilers emit different sets of warnings.

> Incidentally, what do we do for Windows? When new code is committed into
> libtiff, how do we even know that it builds under Windows? We can

We don't unless we try and build it. Nor can we ever be certain that
it builds for every compiler/OS/configuration we're supposed to
support.

> certainly make it so that at least the Windows compiler treats these
> warnings as errors.

While I agree warnings should be fixed whenever possible, this seems
counterproductive. It will simply cause libtiff to break all the time.

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