From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH V8 3/7] libxl: add pvusb API Date: Tue, 10 Nov 2015 18:11:07 +0000 Message-ID: <22082.13115.276320.572627@mariner.uk.xensource.com> References: <1445418510-19614-1-git-send-email-cyliu@suse.com> <1445418510-19614-4-git-send-email-cyliu@suse.com> <22080.57829.461049.37192@mariner.uk.xensource.com> <56421E2B020000660008019B@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Juergen Gross , Wei Liu , Ian Campbell , Chun Yan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org George Dunlap writes ("Re: [Xen-devel] [PATCH V8 3/7] libxl: add pvusb API"): > On Tue, Nov 10, 2015 at 8:41 AM, Chun Yan Liu wrote: > > Which cast? Here, we want to get a uint_8 value, but buf is a string, > > we need to do atoi. > > atoi() isn't a cast, it's a function call. The cast is the (char *) bit. > > I think probably you could get away with declaring buf as (char *). > &buf should be converted to void** automatically without any warnings, > I think. No, char** won't be automatically converted to void**. But void* will be automatically converted to char*. (Will read the rest of this thread later, probably tomorrow.) Ian.