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] Clean dirty code avoiding warning messages when compilin

To: "Xue, Haifeng" <haifeng.xue@xxxxxxxxx>
Subject: Re: [Xen-devel] Clean dirty code avoiding warning messages when compiling
From: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxx>
Date: Wed, 18 Jan 2006 14:08:05 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 18 Jan 2006 13:15:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9FBCE015AF479F46B3B410499F3AE05B177332@pdsmsx405>
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: <9FBCE015AF479F46B3B410499F3AE05B177332@pdsmsx405>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Jan 18, 2006 at 04:58:06PM +0800, Xue, Haifeng wrote:
> Clean dirty code avoiding warning messages when compiling
> 
> Signed-off-by: Haifeng Xue <haifeng.xue@xxxxxxxxx>
>
> -    if (!xs_write(xs, NULL, path, pts, strlen(pts))) {
> +    if (!xs_write(xs, (xs_transaction_t)NULL, path, pts, strlen(pts))) {

Please don't override the type checking with cast to shut up gcc !
The warning is there for a reason, it should be XBT_NULL instead of NULL.

-- 
Vincent Hanquez

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

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