From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Helge Konetzka" <hk@zapateado.de>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Konstantin Kostiuk" <kkostiuk@redhat.com>
Subject: [PULL 2/3] qga/vss-win32: fix compilation with clang++
Date: Tue, 5 Apr 2022 11:20:00 +0200 [thread overview]
Message-ID: <20220405092001.104507-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20220405092001.104507-1-pbonzini@redhat.com>
From: Helge Konetzka <hk@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 <hk@zapateado.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <39400817-3dc9-516d-9096-bc1f68862531@zapateado.de>
Signed-off-by: Paolo Bonzini <pbonzini@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
next prev parent reply other threads:[~2022-04-05 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 9:19 [PULL 0/3] Misc changes for 2022-04-05 Paolo Bonzini
2022-04-05 9:19 ` [PULL 1/3] coverity: update model for latest tools Paolo Bonzini
2022-04-05 9:20 ` Paolo Bonzini [this message]
2022-04-05 9:20 ` [PULL 3/3] docs/system/i386: Add measurement calculation details to amd-memory-encryption Paolo Bonzini
2022-04-05 11:42 ` [PULL 0/3] Misc changes for 2022-04-05 Peter Maydell
2022-04-05 18:46 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220405092001.104507-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=f4bug@amsat.org \
--cc=hk@zapateado.de \
--cc=kkostiuk@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).