[Libvirt-cim] [PATCH] [CU] Fix const pointer warning

lizg at cn.ibm.com lizg at cn.ibm.com
Wed Feb 27 01:48:27 UTC 2008


# HG changeset patch
# User Zhengang Li <lizg at cn.ibm.com>
# Date 1204076903 -28800
# Node ID 8ef92e008bcbcf2336cbccfa083c2d22f690ca1d
# Parent  b2606bc023a8a26ecd25464e976fb16606ed3a47
[CU] Fix const pointer warning

Signed-off-by: Zhengang Li <lizg at cn.ibm.com>

diff -r b2606bc023a8 -r 8ef92e008bcb instance_util.c
--- a/instance_util.c	Tue Feb 26 15:16:00 2008 -0500
+++ b/instance_util.c	Wed Feb 27 09:48:23 2008 +0800
@@ -255,7 +255,7 @@ CMPIInstance *cu_dup_instance(const CMPI
 
 const char *cu_classname_from_inst(CMPIInstance *inst)
 {
-        char *ret = NULL;
+        const char *ret = NULL;
 
         CMPIObjectPath *ref;
         ref = CMGetObjectPath(inst, NULL);
diff -r b2606bc023a8 -r 8ef92e008bcb std_indication.c
--- a/std_indication.c	Tue Feb 26 15:16:00 2008 -0500
+++ b/std_indication.c	Wed Feb 27 09:48:23 2008 +0800
@@ -214,7 +214,7 @@ CMPIStatus stdi_activate_filter(CMPIIndi
         char *cn = NULL;
         
         _ctx = (struct std_indication_ctx *)mi->hdl;
-        cn = CLASSNAME(op);
+        cn = (char *)CLASSNAME(op);
         s = stdi_set_ind_filter_state(_ctx, cn, true);
 
         if (_ctx->handler != NULL && _ctx->handler->activate_fn != NULL) {
@@ -239,7 +239,7 @@ CMPIStatus stdi_deactivate_filter(CMPIIn
         char *cn = NULL;
 
         _ctx = (struct std_indication_ctx *)mi->hdl;
-        cn = CLASSNAME(op);
+        cn = (char *)CLASSNAME(op);
         s = stdi_set_ind_filter_state(_ctx, cn, false);
 
         if (_ctx->handler != NULL && _ctx->handler->deactivate_fn != NULL) {




More information about the Libvirt-cim mailing list