Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-d.one.com (mx-d.one.com [91.198.169.51])
	by mail6.local (Postfix) with ESMTP id D19878014FAE7
	for <filtered@awaresystems.be>; Tue,  3 Dec 2013 17:13:41 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-d: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.42 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42])
	by mx-d.one.com (Postfix) with ESMTP id 86348FF55DB
	for <filtered@awaresystems.be>; Tue,  3 Dec 2013 16:13:41 +0000 (UTC)
Received: by mail-la0-f42.google.com with SMTP id ec20so9459213lab.29
        for <filtered@awaresystems.be>; Tue, 03 Dec 2013 08:13:41 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to:date
         :from:to:in-reply-to:message-id:references:user-agent:mime-version
         :content-type:cc:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe:sender:errors-to;
        bh=V2jPMgXgQvNp0NubFPZd52rEEQxY6V6gR5cB+hxrFp4=;
        b=DmjfqlrBX3dNATCJF+yt1URyyMk+/NvouvaaUrJ1kOwugJVKidfjuWwfPqVgJlPEcF
         TYJ/8koHx78O9pTYJkReWNleUu6QC/KUDTZsFpsqd48Uc4HKDYe4c09zNGfuLXtg73Bg
         8dMC7nuHN2GCmsW8GkFwkpdEENlWJ54X2Kt8WkjaJkogCcEXd4FOhwqM3hNgZ0YSJHjS
         xTBliSgsd6mY2SmS3PdI15r4mMsX0HRXiu1yAjAA0gwsJhyXEV8zDjTyJzYthtwnF7m6
         FIu2t9tlxyABTceIG03eiPrIIKxAPXjLzBOXM4MRcb3U0rbT79m8F923u48dGY1z6l6n
         pZlw==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 195.47.247.76 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.112.151.74 with SMTP id uo10mr1013280lbb.45.1386087221077;
        Tue, 03 Dec 2013 08:13:41 -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.114.57.204 with SMTP id k12csp205708ldq;
        Tue, 3 Dec 2013 08:13:40 -0800 (PST)
X-Received: by 10.112.151.42 with SMTP id un10mr1067937lbb.7.1386087219631;
        Tue, 03 Dec 2013 08:13:39 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 195.47.247.76 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: neutral (google.com: 195.47.247.76 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=195.47.247.76;
Received: by 10.152.97.148 with POP3 id ea20mf6194375lab.33;
        Tue, 03 Dec 2013 08:13:39 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx05.one.com (mx05.one.com [195.47.247.76])
	by mail6.local (Postfix) with ESMTP id CAF8C801500F8
	for <info@awaresystems.be>; Tue,  3 Dec 2013 16:20:33 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx05.one.com (Postfix) with ESMTP id 43A02CF85D
	for <info@awaresystems.be>; Tue,  3 Dec 2013 15:20:32 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id E4E8B35C047;
	Tue,  3 Dec 2013 10:19:52 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 29DD435C044
	for <tiff@lists.maptools.org>; Tue,  3 Dec 2013 10:18:55 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	rB3FIrTb018331; Tue, 3 Dec 2013 09:18:53 -0600 (CST)
Date: Tue, 3 Dec 2013 09:18:53 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Nacho Man <nacho2874@yahoo.com>
In-Reply-To: <1386049038.93974.YahooMailNeo@web162605.mail.bf1.yahoo.com>
Message-ID: <alpine.GSO.2.01.1312030911440.2267@freddy.simplesystems.org>
References: <1385951722.90803.YahooMailNeo@web162605.mail.bf1.yahoo.com>
	<alpine.GSO.2.01.1312020854390.2267@freddy.simplesystems.org>
	<1386015439.3238.YahooMailNeo@web162606.mail.bf1.yahoo.com>
	<1386049038.93974.YahooMailNeo@web162605.mail.bf1.yahoo.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-611567422-1386083934=:2267"
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Tue, 03 Dec 2013 09:18:54 -0600 (CST)
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] Compile problem in tif_jpeg.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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-611567422-1386083934=:2267
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT

On Mon, 2 Dec 2013, Nacho Man wrote:

> Hey, I haven't used mailing lists in a long time.   Just a quick 
> question.  When I reply to this message (like I'm doing now), does 
> it just go to you Bob or does everyone on the mailing list receive 
> it?  It should be everyone, because of the CC to 
> tiff@lists.maptools.org, right?  Thanks.

This depends on the mailing list setting and how your mail client 
behaves.  If your mail client does not tell you who your mail is 
addressed to, then you should get a different mail client.

> I do get some warnings when I compile now.   Like in 
> tiff-4.0.3/contrib/iptcutil/iptcutil.c:241:4: warning: comparison is 
> always false due to limited range of data type [-Wtype-limits] And 
> some warnings about variables being set but never used.  I created a 
> simple C program to try and figure out why I'm getting the 
> comparison is always true or false.  Below is the code for that.
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main() {
>     char c;
>
>     FILE *ifile=fopen("mytestfile","r");
>
>     while ((c = getc(ifile)) != EOF) {
>         printf("%c",c);
>     }
>
> }
>
> When I compile it using my native GNU C compiler on my Linux system 
> with the -Wtype-limits flag, I get no errors.   If I use the PS3's 
> Toolchain GCC to compile it, I get the warning: comparison is always 
> true due to limited range of data type [-Wtype-limits] warning.   If 
> I change the char c; to  a signed char c; and try to compile, no 
> error.  I thought that was weird though.   I though the value range 
> for a signed char was -127 to 127 and for unsigned 0 - 255.   Seeing 
> how the ASCII character chart goes from 0-255, wouldn't I need to 
> use unsigned and not signed?  Any character read from the file would 
> be between 0-255, right?   There shouldn't be any negative values.  
> Could someone explain if those warnings are correct and should I 
> change the codes in the tiff library so it uses signed char's 
> instead of just char's for the various warning messages?  Thanks.

If you look at the documentation for getc(), you will find that it 
returns an integer type so your code is wrong.  Your code would not 
detect EOF since EOF is usually integer -1.  ASCII is from 0-127, not 
to 255.

Regardless of if 'char' defaults to signed or unsigned, these may be 
captured in a buffer as bytes (a string) without changing values. 
Functions which deal with a single 'char' usually pass an 'int' type 
instead.

The iptcutil.c code is not at all wonderful or an example of correct 
coding practices.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-611567422-1386083934=:2267
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/
---559023410-611567422-1386083934=:2267--
