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] mini-os: make xenbus_read_integer and xenbus_pri

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] mini-os: make xenbus_read_integer and xenbus_printf take const strings
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Tue, 26 Aug 2008 17:42:06 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 26 Aug 2008 09:42:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080826163437.GK19615@xxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, "Daniel P. Berrange" <berrange@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <20080826161702.GB4555@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080826163437.GK19615@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Daniel P. Berrange, le Tue 26 Aug 2008 17:34:37 +0100, a écrit :
> If you annotate that declaration with
> 
>    __attribute__ ((__format__ (printf, 4, 3)))
> 
> then gcc will warn you any time a caller gives incorrect args vs
> format string, which can catch some otherwise hidden bugs.

Indeed, actually all mini-os's *print* functions should have it, IIRC
there are a lot of fixes needed to have this compile with -Werror :)

Samuel

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

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