Initialize r variable in MSI_ApplyPatchW

Gerald Pfeifer gerald at pfeifer.com
Tue May 12 18:25:40 CDT 2009


GCC 4.2.1 diagnosed this; the following is the obvious fix/workaround; the 
only thing I'm not sure about is the default value for r in this case.

Gerald

ChangeLog:
Initialize r variable in MSI_ApplyPatchW.

diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index ed8b4ab..1abbaea 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -347,6 +347,8 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
             goto done;
 
         product_code = codes;
+    } else {
+        r = ERROR_SUCCESS;
     }
 
     if (!szCommandLine)



More information about the wine-patches mailing list