]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: fix build without i18n
authorEric Blake <eblake@redhat.com>
Thu, 7 Jun 2012 03:13:57 +0000 (21:13 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 7 Jun 2012 03:32:37 +0000 (21:32 -0600)
If you compile without NLS support, where _() is a no-op macro,
then we end up passing a string literal to a char*, provoking:

In file included from virsh.c:3639:0:
virsh-edit.c: In function ‘cmdSaveImageEdit’:
virsh-edit.c:97:13: error: assignment discards ‘const’ qualifier from pointer target type [-Werror]
virsh-edit.c:106:13: error: assignment discards ‘const’ qualifier from pointer target type [-Werror]

* tools/virsh-edit.c: Be const-safe.

tools/virsh-edit.c

index aa59f25ae08e4f8b0b23e9a17dd976b514b4de5c..27140e22bdbac538ab42a00b6fd1f4478e3d174e 100644 (file)
@@ -55,7 +55,7 @@ do {
     char *doc = NULL;
     char *doc_edited = NULL;
     char *doc_reread = NULL;
-    char *msg = NULL;
+    const char *msg = NULL;
 
     /* Get the XML configuration of the object. */
     doc = (EDIT_GET_XML);