diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index 1ca777284e97d44c547df9bad6d1f7dd1d09d799..367d0ceb1c0e25659243b176e6d33138188bd2c6 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -243,7 +243,7 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged, { virNetClientPtr client = NULL; char *lockdpath; - const char *daemonPath = NULL; + char *daemonPath = NULL; *prog = NULL; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 37e0588fc94e0a7f8738a50c309cc4640523ab82..8271e28141c6c9e2b6efb72b1990403ba4691910 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2652,7 +2652,7 @@ static int virQEMUCapsSaveCache(virQEMUCapsPtr qemuCaps, const char *filename) { virBuffer buf = VIR_BUFFER_INITIALIZER; - const char *xml = NULL; + char *xml = NULL; int ret = -1; size_t i; diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 9d8120f80313937d57a85c042cc743c638433e98..9a1d78fc4f10a4a768d6fdbff5c7a5a4a535500c 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -582,7 +582,7 @@ doRemoteOpen(virConnectPtr conn, trans_tcp, } transport; #ifndef WIN32 - const char *daemonPath = NULL; + char *daemonPath = NULL; #endif /* We handle *ALL* URIs here. The caller has rejected any diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c index 8b28914d4be23a5ed0f2c61057f575a78c5420b6..a80d1365199896949b3a4df7e4a8bd8960f943d9 100644 --- a/src/xenapi/xenapi_utils.c +++ b/src/xenapi/xenapi_utils.c @@ -49,6 +49,7 @@ xenSessionFree(xen_session *session) VIR_FREE(session->error_description[i]); VIR_FREE(session->error_description); } + /* The session_id member is type of 'const char *'. Sigh. */ VIR_FREE(session->session_id); VIR_FREE(session); } diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5a17affccba510b733db15f60dc84aa4cc0f6175..ba472586226c9172fa954dcea1714780ea4c788b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10349,8 +10349,8 @@ vshPrepareDiskXML(xmlNodePtr disk_node, int type) { xmlNodePtr cur = NULL; - const char *disk_type = NULL; - const char *device_type = NULL; + char *disk_type = NULL; + char *device_type = NULL; xmlNodePtr new_node = NULL; char *ret = NULL; diff --git a/tools/wireshark/src/packet-libvirt.c b/tools/wireshark/src/packet-libvirt.c index 0fe5f036d136be8685dd3e9d504dbd1c5f894bcb..5c3c369b08559e3eaeb70169cb1b238c71854c0f 100644 --- a/tools/wireshark/src/packet-libvirt.c +++ b/tools/wireshark/src/packet-libvirt.c @@ -105,7 +105,7 @@ dissect_xdr_string(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, } } -static gchar * +static const gchar * format_xdr_bytes(guint8 *bytes, guint32 length) { gchar *buf; @@ -206,7 +206,7 @@ dissect_xdr_iterable(tvbuff_t *tvb, proto_item *ti, XDR *xdrs, gint ett, int rhf static gboolean dissect_xdr_vector(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, gint ett, - int rhf, gchar *rtype, guint32 size, vir_xdr_dissector_t dissect) + int rhf, const gchar *rtype, guint32 size, vir_xdr_dissector_t dissect) { goffset start; proto_item *ti; @@ -219,7 +219,7 @@ dissect_xdr_vector(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, gint ett, static gboolean dissect_xdr_array(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, gint ett, - int rhf, gchar *rtype, guint32 maxlen, vir_xdr_dissector_t dissect) + int rhf, const gchar *rtype, guint32 maxlen, vir_xdr_dissector_t dissect) { goffset start; proto_item *ti; diff --git a/tools/wireshark/src/packet-libvirt.h b/tools/wireshark/src/packet-libvirt.h index af54407f294df07dfb8b61eadb825e48b353fa09..5f99fdfaedddcea64dd13d566b3ccce4f203faad 100644 --- a/tools/wireshark/src/packet-libvirt.h +++ b/tools/wireshark/src/packet-libvirt.h @@ -105,9 +105,9 @@ static gboolean dissect_xdr_bytes(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, in static gboolean dissect_xdr_pointer(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, vir_xdr_dissector_t dp); static gboolean dissect_xdr_vector(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, gint ett, - int rhf, gchar *rtype, guint32 size, vir_xdr_dissector_t dp); + int rhf, const gchar *rtype, guint32 size, vir_xdr_dissector_t dp); static gboolean dissect_xdr_array(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf, gint ett, - int rhf, gchar *rtype, guint32 maxlen, vir_xdr_dissector_t dp); + int rhf, const gchar *rtype, guint32 maxlen, vir_xdr_dissector_t dp); # include "libvirt/protocol.h"