Rémi Bernon : sxs: Fix uninitialized variable warning.

Alexandre Julliard julliard at winehq.org
Wed Jun 3 16:40:56 CDT 2020


Module: wine
Branch: master
Commit: 2c9c20c0a6c55daf234318cb529a08646d410e02
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2c9c20c0a6c55daf234318cb529a08646d410e02

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Jun  3 11:50:36 2020 +0200

sxs: Fix uninitialized variable warning.

Reported by MinGW GCC 10 with -Wmaybe-uninitialized, this seems to be
a typo.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/sxs/name.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/sxs/name.c b/dlls/sxs/name.c
index a76510a9fe..6b3ae5197a 100644
--- a/dlls/sxs/name.c
+++ b/dlls/sxs/name.c
@@ -135,7 +135,6 @@ static HRESULT WINAPI name_GetDisplayName(
 {
     static const WCHAR fmtW[] = {',','%','s','=','\"','%','s','\"',0};
     struct name *name = impl_from_IAssemblyName( iface );
-    WCHAR version[30];
     unsigned int len;
 
     TRACE("%p, %p, %p, 0x%08x\n", iface, buffer, buflen, flags);
@@ -146,7 +145,7 @@ static HRESULT WINAPI name_GetDisplayName(
     if (name->arch)    len += lstrlenW( archW ) + lstrlenW( name->arch ) + 4;
     if (name->token)   len += lstrlenW( tokenW ) + lstrlenW( name->token ) + 4;
     if (name->type)    len += lstrlenW( typeW ) + lstrlenW( name->type ) + 4;
-    if (name->version) len += lstrlenW( versionW ) + lstrlenW( version ) + 4;
+    if (name->version) len += lstrlenW( versionW ) + lstrlenW( name->version ) + 4;
     if (len > *buflen)
     {
         *buflen = len;




More information about the wine-cvs mailing list