From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: Re: Clean dirty code avoiding warning messages when compiling Date: Wed, 18 Jan 2006 14:08:05 +0100 Message-ID: <20060118130805.GA8267@snarc.org> References: <9FBCE015AF479F46B3B410499F3AE05B177332@pdsmsx405> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <9FBCE015AF479F46B3B410499F3AE05B177332@pdsmsx405> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xue, Haifeng" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 > > - 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