From: Eric Blake Date: Thu, 7 Jun 2012 03:13:57 +0000 (-0600) Subject: build: fix build without i18n X-Git-Tag: v0.9.13-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2ecfe9795526bbde6d302916e39a13b5e1283a0;p=thirdparty%2Flibvirt.git build: fix build without i18n 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. --- diff --git a/tools/virsh-edit.c b/tools/virsh-edit.c index aa59f25ae0..27140e22bd 100644 --- a/tools/virsh-edit.c +++ b/tools/virsh-edit.c @@ -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);