From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v6 06/16] tools/libxc: add a check in xc_hypercall_buffer_free_pages macro Date: Thu, 14 May 2015 12:24:25 +0100 Message-ID: <1431602665.13579.44.camel@citrix.com> References: <1431593718-4828-1-git-send-email-yanghy@cn.fujitsu.com> <1431593718-4828-7-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431593718-4828-7-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang Cc: wei.liu2@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2015-05-14 at 16:55 +0800, Yang Hongyang wrote: > When we use a DECLARE_HYPERCALL_BUFFER_SHADOW define a user ^it defines > pointer '_name' and a shadow xc_hypercall_buffer_t. > then call xc_hypercall_buffer_free_pages(_xch, _name, _nr), ^When then calling > the complier will report '_name' unused error, it's because ^drop it's > xc_hypercall_buffer_free_pages() is a MACRO and '_name' ^is > transparently converted to the hypercall buffer. it confused confuses > the caller because xc_hypercall_buffer_free_pages() do look looks > like a function and take '_name' as an arg. takes > Add an if check to let the compiler think we are actually > using the argument '_name'. > > Signed-off-by: Yang Hongyang I can fix those on commit if there is no other reason for a v7. Acked-by: Ian Campbell