From: Helge Konetzka <h...@zapateado.de> This fixes:
qga/vss-win32/install.cpp:49:24: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *msg = NULL, *nul = strchr(text, '('); ^ ~~~~~~~~~~~~~~~~~ Signed-off-by: Helge Konetzka <h...@zapateado.de> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Konstantin Kostiuk <kkost...@redhat.com> Message-Id: <39400817-3dc9-516d-9096-bc1f68862...@zapateado.de> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- qga/vss-win32/install.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index 8076efe3cb..b57508fbe0 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -46,7 +46,8 @@ void errmsg(DWORD err, const char *text) * If text doesn't contains '(', negative precision is given, which is * treated as though it were missing. */ - char *msg = NULL, *nul = strchr(text, '('); + char *msg = NULL; + const char *nul = strchr(text, '('); int len = nul ? nul - text : -1; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | -- 2.35.1