qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Kostiantyn Kostiuk <kkostiuk@redhat.com>,
	Michael Roth <michael.roth@amd.com>,
	Bernhard Beschow <shentey@gmail.com>
Subject: [PATCH] qga/vss-win32/install: Remove _com_util::ConvertStringToBSTR()
Date: Sat,  1 Nov 2025 14:03:30 +0100	[thread overview]
Message-ID: <20251101130330.1927-1-shentey@gmail.com> (raw)

Now that MSYS2 provides an implementation of the function it clashes with
QEMU's, resulting in a compilation error. Remove it since it doesn't seem
to be used anyway.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 qga/vss-win32/install.cpp | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp
index 7b25d9098b..147bf387fd 100644
--- a/qga/vss-win32/install.cpp
+++ b/qga/vss-win32/install.cpp
@@ -548,25 +548,6 @@ STDAPI DllUnregisterServer(void)
 }
 
 
-/* Support function to convert ASCII string into BSTR (used in _bstr_t) */
-namespace _com_util
-{
-    BSTR WINAPI ConvertStringToBSTR(const char *ascii) {
-        int len = strlen(ascii);
-        BSTR bstr = SysAllocStringLen(NULL, len);
-
-        if (!bstr) {
-            return NULL;
-        }
-
-        if (mbstowcs(bstr, ascii, len) == (size_t)-1) {
-            qga_debug("Failed to convert string '%s' into BSTR", ascii);
-            bstr[0] = 0;
-        }
-        return bstr;
-    }
-}
-
 /* Stop QGA VSS provider service using Winsvc API  */
 STDAPI StopService(void)
 {
-- 
2.51.2



             reply	other threads:[~2025-11-01 13:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-01 13:03 Bernhard Beschow [this message]
2025-11-01 13:13 ` [PATCH] qga/vss-win32/install: Remove _com_util::ConvertStringToBSTR() Peter Maydell
2025-11-01 13:48   ` Bernhard Beschow
2025-11-01 16:18     ` Peter Maydell
2025-11-03  7:30   ` Kostiantyn Kostiuk
2025-11-03  7:31     ` Kostiantyn Kostiuk

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=20251101130330.1927-1-shentey@gmail.com \
    --to=shentey@gmail.com \
    --cc=kkostiuk@redhat.com \
    --cc=michael.roth@amd.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).