mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
When we use a DECLARE_HYPERCALL_BUFFER_SHADOW it defines a user pointer '_name' and a shadow xc_hypercall_buffer_t. When calling xc_hypercall_buffer_free_pages(_xch, _name, _nr), the complier will report '_name' unused error, because xc_hypercall_buffer_free_pages() is a MACRO and '_name' is transparently converted to the hypercall buffer. it confuses the caller because xc_hypercall_buffer_free_pages() looks like a function and takes '_name' as an arg. Add an if check to let the compiler think we are actually using the argument '_name'. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> [ ijc -- some rewording of the commit message ]