From abc8cb1b689390381964187481f523cfab60b21c Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 30 Aug 2018 12:13:40 +0200 Subject: [PATCH] Workaround lack of constness in custom_operations::identifier Sadly the custom_operations struct of the OCaml C API uses char* for the 'identifier' member, even though it does not change it. To avoid getting warnings when building with stricter CFLAGS, apply ugly casts. --- libvirt/libvirt_c_epilogue.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libvirt/libvirt_c_epilogue.c b/libvirt/libvirt_c_epilogue.c index 4574131..cea975a 100644 --- a/libvirt/libvirt_c_epilogue.c +++ b/libvirt/libvirt_c_epilogue.c @@ -228,7 +228,7 @@ static void pol_finalize (value); static void vol_finalize (value); static struct custom_operations conn_custom_operations = { - "conn_custom_operations", + (char *) "conn_custom_operations", conn_finalize, custom_compare_default, custom_hash_default, @@ -237,7 +237,7 @@ static struct custom_operations conn_custom_operations = { }; static struct custom_operations dom_custom_operations = { - "dom_custom_operations", + (char *) "dom_custom_operations", dom_finalize, custom_compare_default, custom_hash_default, @@ -247,7 +247,7 @@ static struct custom_operations dom_custom_operations = { }; static struct custom_operations net_custom_operations = { - "net_custom_operations", + (char *) "net_custom_operations", net_finalize, custom_compare_default, custom_hash_default, @@ -256,7 +256,7 @@ static struct custom_operations net_custom_operations = { }; static struct custom_operations pol_custom_operations = { - "pol_custom_operations", + (char *) "pol_custom_operations", pol_finalize, custom_compare_default, custom_hash_default, @@ -265,7 +265,7 @@ static struct custom_operations pol_custom_operations = { }; static struct custom_operations vol_custom_operations = { - "vol_custom_operations", + (char *) "vol_custom_operations", vol_finalize, custom_compare_default, custom_hash_default, -- 1.8.3.1