WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Make Xen headers lint-clean

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Make Xen headers lint-clean
From: John Levon <john.levon@xxxxxxx>
Date: Fri, 15 Jun 2007 11:41:58 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Jun 2007 03:39:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2980CBF.92E8%Keir.Fraser@xxxxxxxxxxxx>
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>
References: <b9d1affca0ff606998ae.1181862120@xenbld> <C2980CBF.92E8%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Fri, Jun 15, 2007 at 09:30:39AM +0100, Keir Fraser wrote:

> > Make ring.h and xs_wire.h lint clean. Add an unused attribute to xsd_errors 
> > if
> > using GCC, so we don't get duplicate arrays in every object including the
> > header.
> 
> Casting memset() to void is completely barking. Noone ever cares about the
> return value, or looks at it: is half the C code in the universe not lint
> clean therefore?

Correct. lint isn't able to differentiate between sensible code and not. Which
leaves us with either having one slightly silly piece of code here or
maintaining a permanent patch against the file. I don't think it's too ugly to
not apply.

> And xsd_errors[] already has the unused attribute; this patch does not add
> it as the changeset comment suggests.

My apologies, I didn't notice this from forward-porting the patch.

> Do you require to use that header file with a compiler other than gcc?

Yes, all the public headers need to be compiled with Sun CC as well.
Unfortunately 'unused' is one of the GCC attributes they haven't implemented
yet.

regards
john

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>