diff options
| author | Helge Konetzka <[email protected]> | 2022-03-16 14:54:07 +0100 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-04-05 10:42:06 +0200 |
| commit | 7bd16378bb3facf0673a23c89bf0d968734db347 (patch) | |
| tree | cccc567f2424c797b63fb66bb41c6949507ae3aa | |
| parent | fae4fad5b4b59af9cb283709b66a0680069f74ba (diff) | |
qga/vss-win32: fix compilation with clang++
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 <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Konstantin Kostiuk <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| -rw-r--r-- | qga/vss-win32/install.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |
