Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id 42D45400107
	for <info@awaresystems.be>; Tue, 29 Jun 2010 19:19:53 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id 371748E925B; Tue, 29 Jun 2010 19:19:40 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-q.b-one.net (Postfix) with ESMTP id D21D78E925A for
 <info@awaresystems.be>; Tue, 29 Jun 2010 19:19:39 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 61FA21D0E5296; Tue, 29 Jun 2010
 12:18:16 -0500 (EST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com
 [209.85.212.44]) by lists.maptools.org (Postfix) with ESMTP id 3FE171D0E5293
 for <tiff@lists.maptools.org>; Tue, 29 Jun 2010 12:12:28 -0500 (EST)
Received: by vws10 with SMTP id 10so615836vws.3 for
 <tiff@lists.maptools.org>; Tue, 29 Jun 2010 10:12:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.62.200 with SMTP id y8mr4016339vch.244.1277831547821;
 Tue,  29 Jun 2010 10:12:27 -0700 (PDT)
Received: by 10.220.76.73 with HTTP; Tue, 29 Jun 2010 10:12:27 -0700 (PDT)
In-Reply-To: <4C1A9D5B.3000908@sidefx.com>
References: <4C1A9D5B.3000908@sidefx.com>
Date: Tue, 29 Jun 2010 13:12:27 -0400
Message-ID: <AANLkTimVYAW8ryz3BvY76xbCU3kpXfbu16BXR7Y-2wt0@mail.gmail.com>
From: Albert Cahalan <acahalan@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 Thu, Jun 17, 2010 at 6:10 PM, Edward Lam <edward@sidefx.com> wrote:
> Hi,
>
> On MSVC2005 64-bit, compiling CVS HEAD gives me:
>
> tif_read.c(207) : warning C4244: '=' : conversion from 'tmsize_t' to
> 'int', possible loss of data
>
> Looking at it, it seems to me that we want "read_ahead" to be tmsize_t
> instead of int? Similarly, I think TIFFFillStripPartial() should take an
> tmsize_t instead.

It's rather doubtful, considering the purpose of the variable. Here:

// C4244 warning is more trouble than it's worth
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4244)
#endif

// code goes here

// C4244 back on
#if defined(_MSC_VER)
#pragma warning(pop)
#endif


That would be the generic case, usable in an API header file.
You can skip the push/pop for *.c files.
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
