From d02dbf44922231799f851bff962759b651c41c2c Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 4 Jun 2009 10:12:56 +0200 Subject: [PATCH] msi: Initialize some variables. --- dlls/msi/registry.c | 2 +- dlls/msi/tests/package.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 3ba34d12072..f22c01fb680 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -1822,7 +1822,7 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid, LPWSTR patch, LPWSTR targetprod, MSIINSTALLCONTEXT *targetctx, LPWSTR targetsid, DWORD *sidsize, LPWSTR *transforms) { - MSIPATCHSTATE state; + MSIPATCHSTATE state = MSIPATCHSTATE_INVALID; LPWSTR ptr, patches = NULL; HKEY prod, patchkey = 0; HKEY localprod = 0, localpatch = 0; diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index a9eef76e9c0..3263ec17bb3 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -939,6 +939,7 @@ static void test_settargetpath(void) sz = sizeof tempdir - 1; r = MsiGetTargetPath( hpkg, "TARGETDIR", tempdir, &sz ); sprintf( file, "%srootfile.txt", tempdir ); + buffer[0] = 0; query_file_path( hpkg, "[#RootFile]", buffer ); ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); ok( !lstrcmp(buffer, file), "Expected %s, got %s\n", file, buffer ); @@ -11057,8 +11058,8 @@ static void test_access(void) static void test_emptypackage(void) { - MSIHANDLE hpkg, hdb, hsuminfo; - MSIHANDLE hview, hrec; + MSIHANDLE hpkg = 0, hdb = 0, hsuminfo = 0; + MSIHANDLE hview = 0, hrec = 0; MSICONDITION condition; CHAR buffer[MAX_PATH]; DWORD size; -- 2.11.4.GIT