[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: mark parameters in stub functions as unused



Hopefully this can fix issues like:

In file included from ../../src/libxl/xen_xl.c:24:0:
/home/osstest/build.147035.build-amd64-libvirt/xendist/usr/local/include/libxl.h:
 In function 'libxl_cpuid_apply_policy':
/home/osstest/build.147035.build-amd64-libvirt/xendist/usr/local/include/libxl.h:2345:56:
 error: unused parameter 'ctx' [-Werror=unused-parameter]
 static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) {}

Fixes: dacb80f9 ("tools/libxl: Remove libxl_cpuid_{set,apply_policy}() from the 
API")
Signed-off-by: Wei Liu <wl@xxxxxxx>
---
Not able to test this locally, please review carefully...
---
 tools/libxl/libxl.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index d1d31b1e67..fde8548847 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -2342,9 +2342,13 @@ int 
libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid,
  * change in some cases for existing software, but there is 0 of that in
  * practice.
  */
-static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) {}
-static inline void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_cpuid_policy_list cpuid) {}
+static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx 
__attribute__((unused)),
+                                            uint32_t domid 
__attribute__((unused)))
+{}
+static inline void libxl_cpuid_set(libxl_ctx *ctx __attribute__((unused)),
+                                   uint32_t domid __attribute__((unused)),
+                                   libxl_cpuid_policy_list cpuid 
__attribute__((unused)))
+{}
 #endif
 
 /*
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.