advpack/tests: Win64 printf format warning fixes.

Michael [Plouj] Ploujnikov ploujj at gmail.com
Wed Oct 11 19:12:46 CDT 2006


-- 
()  ASCII Ribbon Campaign
/\  - against HTML mail & vCards
-------------- next part --------------
advpack/tests: Win64 printf format warning fixes.

From: Michael Ploujnikov <ploujj at gmail.com>


---

 dlls/advpack/tests/Makefile.in |    1 -
 dlls/advpack/tests/advpack.c   |   66 ++++++++++++++++++++--------------------
 dlls/advpack/tests/files.c     |   46 ++++++++++++++--------------
 dlls/advpack/tests/install.c   |   42 +++++++++++++------------
 4 files changed, 77 insertions(+), 78 deletions(-)

diff --git a/dlls/advpack/tests/Makefile.in b/dlls/advpack/tests/Makefile.in
index 7c20e45..d0bdcbc 100644
--- a/dlls/advpack/tests/Makefile.in
+++ b/dlls/advpack/tests/Makefile.in
@@ -4,7 +4,6 @@ SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 TESTDLL   = advpack.dll
 IMPORTS   = cabinet user32 advapi32 kernel32
-EXTRADEFS = -DWINE_NO_LONG_AS_INT
 
 CTESTS = \
 	advpack.c \
diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c
index b747e76..ff812f3 100644
--- a/dlls/advpack/tests/advpack.c
+++ b/dlls/advpack/tests/advpack.c
@@ -88,28 +88,28 @@ static void version_test(void)
     major = minor = 0;
     hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
     ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
-        "0x%08lx\n", hr);
-    trace("kernel32.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n",
+        "0x%08x\n", hr);
+    trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
            major, minor);
 
     major = minor = 0;
     hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
     ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
-        "0x%08lx\n", hr);
+        "0x%08x\n", hr);
     trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
           HIWORD(minor), LOWORD(minor));
 
     major = minor = 0;
     hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE);
     ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
-        "0x%08lx\n", hr);
-    trace("advpack.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n",
+        "0x%08x\n", hr);
+    trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
            major, minor);
 
     major = minor = 0;
     hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE);
     ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
-        "0x%08lx\n", hr);
+        "0x%08x\n", hr);
     trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
           HIWORD(minor), LOWORD(minor));
 }
@@ -246,7 +246,7 @@ static void translateinfstring_test()
                              "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
     ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
     ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
-    ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize);
+    ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
 
     buffer[0] = 0;
     /* try other nonexistent section */
@@ -272,7 +272,7 @@ static void translateinfstring_test()
     if(hr == ERROR_SUCCESS)
     {
         ok(!strcmp(buffer, PROG_FILES), "Expected '%s', got '%s'\n", PROG_FILES, buffer);
-        ok(dwSize == PROG_FILES_LEN, "Expected size %ld, got %ld\n", PROG_FILES_LEN, dwSize);
+        ok(dwSize == PROG_FILES_LEN, "Expected size %d, got %d\n", PROG_FILES_LEN, dwSize);
     }
 
     buffer[0] = 0;
@@ -283,7 +283,7 @@ static void translateinfstring_test()
     todo_wine
     {
         ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
-        ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize);
+        ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
     }
 
     DeleteFile("c:\\a.inf");
@@ -303,30 +303,30 @@ static void translateinfstringex_test(vo
 
     /* try a NULL filename */
     hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try an empty filename */
     hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-        "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+        "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
 
     /* try a NULL hinf */
     hr = pOpenINFEngine("c:\\test.inf", "Options.NTx86", 0, NULL, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* open the INF without the Install section specified */
     hr = pOpenINFEngine("c:\\test.inf", NULL, 0, &hinf, NULL);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
     /* try a NULL hinf */
     hr = pTranslateInfStringEx(NULL, "c:\\test.inf", "Options.NTx86", "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try a NULL filename */
     hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try an empty filename */
     size = MAX_PATH;
@@ -336,63 +336,63 @@ static void translateinfstringex_test(vo
     todo_wine
     {
         ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
-        ok(size == 25, "Expected size 25, got %ld\n", size);
+        ok(size == 25, "Expected size 25, got %d\n", size);
     }
 
     /* try a NULL translate section */
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", NULL, "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try an empty translate section */
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "", "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %ld\n", hr);
+    ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %d\n", hr);
 
     /* try a NULL translate key */
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", NULL,
                               buffer, size, &size, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try an empty translate key */
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "",
                               buffer, size, &size, NULL);
-    ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %ld\n", hr);
+    ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %d\n", hr);
 
     /* successfully translate the string */
     size = MAX_PATH;
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     todo_wine
     {
         ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
-        ok(size == 25, "Expected size 25, got %ld\n", size);
+        ok(size == 25, "Expected size 25, got %d\n", size);
     }
 
     /* try a NULL hinf */
     hr = pCloseINFEngine(NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* successfully close the hinf */
     hr = pCloseINFEngine(hinf);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
     /* open the inf with the install section */
     hr = pOpenINFEngine("c:\\test.inf", "section", 0, &hinf, NULL);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
     /* translate the string with the install section specified */
     size = MAX_PATH;
     hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir",
                               buffer, size, &size, NULL);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(!strcmp(buffer, PROG_FILES), "Expected %s, got %s\n", PROG_FILES, buffer);
-    ok(size == PROG_FILES_LEN, "Expected size %ld, got %ld\n", PROG_FILES_LEN, size);
+    ok(size == PROG_FILES_LEN, "Expected size %d, got %d\n", PROG_FILES_LEN, size);
 
     /* close the INF again */
     hr = pCloseINFEngine(hinf);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
     DeleteFileA("c:\\test.inf");
 }
@@ -436,19 +436,19 @@ static void setperusersecvalues_test(voi
     /* try a NULL pPerUser */
     hr = pSetPerUserSecValues(NULL);
     todo_wine
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
 
     /* at the very least, szGUID must be valid */
     peruser.szGUID[0] = '\0';
     hr = pSetPerUserSecValues(&peruser);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
 
     /* set initial values */
     lstrcpy(peruser.szGUID, "guid");
     hr = pSetPerUserSecValues(&peruser);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(OPEN_GUID_KEY(), "Expected guid key to exist\n");
     ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
     ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
@@ -465,7 +465,7 @@ static void setperusersecvalues_test(voi
     /* raise the version, but bRollback is FALSE, so vals not saved */
     lstrcpy(peruser.szVersion, "2,1,1,1");
     hr = pSetPerUserSecValues(&peruser);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
     ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
     ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
@@ -482,7 +482,7 @@ static void setperusersecvalues_test(voi
     peruser.bRollback = TRUE;
     lstrcpy(peruser.szVersion, "3,1,1,1");
     hr = pSetPerUserSecValues(&peruser);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
     ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
     ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c
index 8e0ea73..b5a5fa7 100644
--- a/dlls/advpack/tests/files.c
+++ b/dlls/advpack/tests/files.c
@@ -139,7 +139,7 @@ static void test_AddDelBackupEntry(void)
 
     /* try a NULL file list */
     res = pAddDelBackupEntry(NULL, "backup", "basename", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(!DeleteFileA(path), "Expected path to not exist\n");
 
     lstrcpyA(path, CURR_DIR);
@@ -147,7 +147,7 @@ static void test_AddDelBackupEntry(void)
 
     /* try an empty base name */
     res = pAddDelBackupEntry("one\0two\0three\0", "backup", "", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(!DeleteFileA(path), "Expected path to not exist\n");
 
     lstrcpyA(path, CURR_DIR);
@@ -155,14 +155,14 @@ static void test_AddDelBackupEntry(void)
 
     /* try an invalid flag */
     res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", 0);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(!DeleteFileA(path), "Expected path to not exist\n");
 
     lstrcpyA(path, "c:\\basename.INI");
 
     /* create the INF file */
     res = pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
     ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
     ok(DeleteFileA(path), "Expected path to exist\n");
@@ -173,7 +173,7 @@ static void test_AddDelBackupEntry(void)
     /* try to create the INI file in a nonexistent directory */
     RemoveDirectoryA("backup");
     res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(!check_ini_file_attr(path), "Expected ini file to not be hidden\n");
     ok(!check_ini_contents(path, TRUE), "Expected ini contents to not match\n");
     ok(!DeleteFileA(path), "Expected path to not exist\n");
@@ -181,7 +181,7 @@ static void test_AddDelBackupEntry(void)
     /* try an existent, relative backup directory */
     CreateDirectoryA("backup", NULL);
     res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
     ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
     ok(DeleteFileA(path), "Expected path to exist\n");
@@ -191,14 +191,14 @@ static void test_AddDelBackupEntry(void)
 
     /* try a NULL backup dir, INI is created in c:\windows */
     res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
 
     /* remove the entries with AADBE_DEL_ENTRY */
     SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
     res = pAddDelBackupEntry("one\0three\0", NULL, "basename", AADBE_DEL_ENTRY);
     SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
-    ok(res == S_OK, "Expected S_OK, got %ld\n", res);
+    ok(res == S_OK, "Expected S_OK, got %d\n", res);
     ok(check_ini_contents(path, FALSE), "Expected ini contents to match\n");
     ok(DeleteFileA(path), "Expected path to exist\n");
 }
@@ -419,18 +419,18 @@ static void test_ExtractFiles(void)
 
     /* try NULL cab file */
     hr = pExtractFiles(NULL, destFolder, 0, NULL, NULL, 0);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
     ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
     
     /* try NULL destination */
     hr = pExtractFiles("extract.cab", NULL, 0, NULL, NULL, 0);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
     ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n");
 
     /* extract all files in the cab to nonexistent destination directory */
     hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0);
     ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND),
-       "Expected %ld, got %ld\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), hr);
+       "Expected %d, got %d\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), hr);
     ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
     ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
     ok(!RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to not exist\n");
@@ -439,7 +439,7 @@ static void test_ExtractFiles(void)
     /* extract all files in the cab to the destination directory */
     CreateDirectoryA("dest", NULL);
     hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
     ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
     ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
@@ -448,7 +448,7 @@ static void test_ExtractFiles(void)
 
     /* extract all files to a relative destination directory */
     hr = pExtractFiles("extract.cab", "dest", 0, NULL, NULL, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
     ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
     ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
@@ -457,7 +457,7 @@ static void test_ExtractFiles(void)
 
     /* only extract two of the files from the cab */
     hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:testdir\\c.txt", NULL, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
     ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
     ok(RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to exist\n");
@@ -466,7 +466,7 @@ static void test_ExtractFiles(void)
 
     /* use valid chars before and after file list */
     hr = pExtractFiles("extract.cab", "dest", 0, " :\t: a.txt:testdir\\c.txt  \t:", NULL, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
     ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
     ok(RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to exist\n");
@@ -475,20 +475,20 @@ static void test_ExtractFiles(void)
 
     /* use invalid chars before and after file list */
     hr = pExtractFiles("extract.cab", "dest", 0, " +-\\ a.txt:testdir\\c.txt  a_:", NULL, 0);
-    ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
+    ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
     ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
     ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
     ok(!RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to not exist\n");
 
     /* try an empty file list */
     hr = pExtractFiles("extract.cab", "dest", 0, "", NULL, 0);
-    ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
+    ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
     ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
     ok(!RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to not exist\n");
 
     /* try a nonexistent file in the file list */
     hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:idontexist:testdir\\c.txt", NULL, 0);
-    ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
+    ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
     ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
     ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
     ok(!RemoveDirectoryA("dest\\testdir"), "Exepected dest\\testdir to not exist\n");
@@ -510,22 +510,22 @@ static void test_AdvInstallFile(void)
 
     /* try invalid source directory */
     hr = pAdvInstallFile(NULL, NULL, "source.txt", destFolder, "destination.txt", 0, 0);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
     ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
 
     /* try invalid source file */
     hr = pAdvInstallFile(NULL, CURR_DIR, NULL, destFolder, "destination.txt", 0, 0);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
     ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
 
     /* try invalid destination directory */
     hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", NULL, "destination.txt", 0, 0);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
     ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
 
     /* try copying to nonexistent destination directory */
     hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, "destination.txt", 0, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
 
     /* native windows screws up if the source file doesn't exist */
@@ -534,7 +534,7 @@ static void test_AdvInstallFile(void)
     createTestFile("dest\\destination.txt");
     hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder,
                          "destination.txt", AIF_NOOVERWRITE | AIF_QUIET, 0);
-    ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
     ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
 
diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c
index c25b87f..00ed378 100644
--- a/dlls/advpack/tests/install.c
+++ b/dlls/advpack/tests/install.c
@@ -89,17 +89,17 @@ static void test_RunSetupCommand()
 
     /* try an invalid cmd name */
     hr = pRunSetupCommand(NULL, NULL, "Install", "Dir", "Title", NULL, 0, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try an invalid directory */
     hr = pRunSetupCommand(NULL, "winver.exe", "Install", NULL, "Title", NULL, 0, NULL);
-    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
+    ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
 
     /* try to run a nonexistent exe */
     hexe = (HANDLE)0xdeadbeef;
     hr = pRunSetupCommand(NULL, "idontexist.exe", "Install", "c:\\windows\\system32", "Title", &hexe, 0, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
     ok(hexe == NULL, "Expcted hexe to be NULL\n");
     ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
 
@@ -107,21 +107,21 @@ static void test_RunSetupCommand()
     hexe = (HANDLE)0xdeadbeef;
     hr = pRunSetupCommand(NULL, "winver.exe", "Install", "non\\existent\\directory", "Title", &hexe, 0, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY),
-       "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n", hr);
     ok(hexe == NULL, "Expcted hexe to be NULL\n");
     ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
 
     /* try to run an exe with the RSC_FLAG_INF flag */
     hexe = (HANDLE)0xdeadbeef;
     hr = pRunSetupCommand(NULL, "winver.exe", "Install", "c:\\windows\\system32", "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
-    ok(is_spapi_err(hr), "Expected a setupapi error, got %ld\n", hr);
+    ok(is_spapi_err(hr), "Expected a setupapi error, got %d\n", hr);
     ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n");
     ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
 
     /* run winver.exe */
     hexe = (HANDLE)0xdeadbeef;
     hr = pRunSetupCommand(NULL, "winver.exe", "Install", "c:\\windows\\system32", "Title", &hexe, 0, NULL);
-    ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %ld\n", hr);
+    ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %d\n", hr);
     ok(hexe != NULL, "Expected hexe to be non-NULL\n");
     ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n");
 
@@ -134,44 +134,44 @@ static void test_RunSetupCommand()
     lstrcpy(dir, CURR_DIR);
     lstrcat(dir, "\\one");
     hr = pRunSetupCommand(NULL, path, "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
-    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
+    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
 
     /* try a full path to the INF, NULL working dir */
     hr = pRunSetupCommand(NULL, path, "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
-       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
 
     /* try a full path to the INF, empty working dir */
     hr = pRunSetupCommand(NULL, path, "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
-    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
+    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
 
     /* try a relative path to the INF, with working dir provided */
     hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
-    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
+    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
 
     /* try a relative path to the INF, NULL working dir */
     hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
-       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
 
     /* try a relative path to the INF, empty working dir */
     hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
-    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
+    ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
 
     /* try only the INF filename, with working dir provided */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
 
     /* try only the INF filename, NULL working dir */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
-       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
 
     /* try only the INF filename, empty working dir */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
 
     DeleteFileA("one\\test.inf");
     RemoveDirectoryA("one");
@@ -181,17 +181,17 @@ static void test_RunSetupCommand()
     /* try INF file in the current directory, working directory provided */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
 
     /* try INF file in the current directory, NULL working directory */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
-       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
 
     /* try INF file in the current directory, empty working directory */
     hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
-       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
+       "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
 }
 
 static void test_LaunchINFSection()
@@ -202,7 +202,7 @@ static void test_LaunchINFSection()
 
     /* try an invalid cmdline */
     hr = pLaunchINFSection(NULL, NULL, NULL, 0);
-    ok(hr == 1, "Expected 1, got %ld\n", hr);
+    ok(hr == 1, "Expected 1, got %d\n", hr);
 
     CreateDirectoryA("one", NULL);
     create_inf_file("one\\test.inf");
@@ -212,7 +212,7 @@ static void test_LaunchINFSection()
     lstrcat(cmdline, "\\");
     lstrcat(cmdline, "one\\test.inf,DefaultInstall,,4");
     hr = pLaunchINFSection(NULL, NULL, cmdline, 0);
-    ok(hr == 0, "Expected 0, got %ld\n", hr);
+    ok(hr == 0, "Expected 0, got %d\n", hr);
 
     DeleteFileA("one\\test.inf");
     RemoveDirectoryA("one");
@@ -221,7 +221,7 @@ static void test_LaunchINFSection()
 
     /* try just the INF filename */
     hr = pLaunchINFSection(NULL, NULL, file, 0);
-    ok(hr == 0, "Expected 0, got %ld\n", hr);
+    ok(hr == 0, "Expected 0, got %d\n", hr);
 
     DeleteFileA("test.inf");
 }


More information about the wine-patches mailing list