This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] libfsimage: Make it build on NetBSD

To: Christoph Egger <Christoph.Egger@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libfsimage: Make it build on NetBSD
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 23 Sep 2007 12:16:42 +0100
Delivery-date: Sun, 23 Sep 2007 04:12:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200709211439.46415.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acf90zfVdmR03mnGEdyrigAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH] libfsimage: Make it build on NetBSD
User-agent: Microsoft-Entourage/
On 21/9/07 13:39, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:

> Attached patch makes libfsimage build on NetBSD
> by fixing a number of those errors:
> cc1: warnings being treated as errors
> fsys_fat.c: In function 'fat_dir':
> fsys_fat.c:304: warning: array subscript has type 'char'

You also cast before a comparison with a char literal ('/'). Surely that
isn't necessary?

For the rest, it does sound like NetBSD's ctype.h is strictly compliant with
ISO C, which requires a non-EOF argument to be representable as an unsigned
char. Clearly a negative argument is not representable as an unsigned char
of the same integer value, so a cast is needed to force things to comply
with the ISO spec. Bah.

 -- Keir

Xen-devel mailing list