summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da38e7c)
raw | patch | inline | side by side (parent: da38e7c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 23 Dec 2016 17:47:10 +0000 (18:47 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 23 Dec 2016 17:47:10 +0000 (18:47 +0100) |
src/virt.c:939:13: warning: initializing 'char *' with an expression of type 'const char [34]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
char *bd_xmlpath = "/domain/devices/disk/target[@dev]";
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/virt.c:941:20: warning: assigning to 'char *' from 'const char [34]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
bd_xmlpath = "/domain/devices/disk/source[@dev]";
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char *bd_xmlpath = "/domain/devices/disk/target[@dev]";
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/virt.c:941:20: warning: assigning to 'char *' from 'const char [34]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
bd_xmlpath = "/domain/devices/disk/source[@dev]";
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/virt.c | patch | blob | history |
diff --git a/src/virt.c b/src/virt.c
index 4dce6e038836505f7759d673a16a10424b4acd34..830db5136db00a015857a58b53d6d84643d11500 100644 (file)
--- a/src/virt.c
+++ b/src/virt.c
}
/* Block devices. */
- char *bd_xmlpath = "/domain/devices/disk/target[@dev]";
+ const char *bd_xmlpath = "/domain/devices/disk/target[@dev]";
if (blockdevice_format == source)
bd_xmlpath = "/domain/devices/disk/source[@dev]";
- xpath_obj = xmlXPathEval((xmlChar *)bd_xmlpath, xpath_ctx);
+ xpath_obj = xmlXPathEval((const xmlChar *)bd_xmlpath, xpath_ctx);
if (xpath_obj == NULL || xpath_obj->type != XPATH_NODESET ||
xpath_obj->nodesetval == NULL)