Commit e5c1a014 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

shell32/tests: Win64 printf format warning fixes.

parent 89e1d294
......@@ -5,7 +5,6 @@ VPATH = @srcdir@
TESTDLL = shell32.dll
IMPORTS = shell32 ole32 oleaut32 shlwapi advapi32 kernel32
EXTRALIBS = -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
generated.c \
......
......@@ -178,7 +178,7 @@ static void loadShell32(void)
{
HRESULT hr = pSHGetMalloc(&pMalloc);
ok(SUCCEEDED(hr), "SHGetMalloc failed: 0x%08lx\n", hr);
ok(SUCCEEDED(hr), "SHGetMalloc failed: 0x%08x\n", hr);
ok(pMalloc != NULL, "SHGetMalloc returned a NULL IMalloc\n");
}
......@@ -187,7 +187,7 @@ static void loadShell32(void)
shellVersion.cbSize = sizeof(shellVersion);
pDllGetVersion(&shellVersion);
if (winetest_interactive)
printf("shell32 version is %ld.%ld\n",
printf("shell32 version is %d.%d\n",
shellVersion.dwMajorVersion, shellVersion.dwMinorVersion);
}
}
......@@ -296,7 +296,7 @@ static void testSHGetFolderLocationInvalidArgs(void)
hr = pSHGetFolderLocation(NULL, 0xeeee, NULL, 0, &pidl);
ok(hr == E_INVALIDARG,
"SHGetFolderLocation(NULL, 0xeeee, NULL, 0, &pidl)\n"
"returned 0x%08lx, expected E_INVALIDARG\n", hr);
"returned 0x%08x, expected E_INVALIDARG\n", hr);
if (SUCCEEDED(hr))
IMalloc_Free(pMalloc, pidl);
/* check a bogus user token: */
......@@ -304,7 +304,7 @@ static void testSHGetFolderLocationInvalidArgs(void)
hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, (HANDLE)2, 0, &pidl);
ok(hr == E_FAIL,
"SHGetFolderLocation(NULL, CSIDL_FAVORITES, 2, 0, &pidl)\n"
"returned 0x%08lx, expected E_FAIL\n", hr);
"returned 0x%08x, expected E_FAIL\n", hr);
if (SUCCEEDED(hr))
IMalloc_Free(pMalloc, pidl);
/* check reserved is not zero: */
......@@ -312,7 +312,7 @@ static void testSHGetFolderLocationInvalidArgs(void)
hr = pSHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl);
ok(hr == E_INVALIDARG,
"SHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl)\n"
"returned 0x%08lx, expected E_INVALIDARG\n", hr);
"returned 0x%08x, expected E_INVALIDARG\n", hr);
if (SUCCEEDED(hr))
IMalloc_Free(pMalloc, pidl);
/* a NULL pidl pointer crashes, so don't test it */
......@@ -328,7 +328,7 @@ static void testSHGetSpecialFolderLocationInvalidArgs(void)
/* SHGetSpecialFolderLocation(NULL, 0, NULL) crashes */
hr = pSHGetSpecialFolderLocation(NULL, 0xeeee, &pidl);
ok(hr == E_INVALIDARG,
"SHGetSpecialFolderLocation(NULL, 0xeeee, &pidl) returned 0x%08lx, "
"SHGetSpecialFolderLocation(NULL, 0xeeee, &pidl) returned 0x%08x, "
"expected E_INVALIDARG\n", hr);
}
......@@ -344,11 +344,11 @@ static void testSHGetFolderPathInvalidArgs(void)
SHGFP_TYPE_DEFAULT, path);
ok(hr == E_FAIL,
"SHGetFolderPathA(NULL, CSIDL_DESKTOP, 2, SHGFP_TYPE_DEFAULT, path)\n"
"returned 0x%08lx, expected E_FAIL\n", hr);
"returned 0x%08x, expected E_FAIL\n", hr);
hr = pSHGetFolderPathA(NULL, 0xeeee, NULL, SHGFP_TYPE_DEFAULT, path);
ok(hr == E_INVALIDARG,
"SHGetFolderPathA(NULL, 0xeeee, NULL, SHGFP_TYPE_DEFAULT, path)\n"
"returned 0x%08lx, expected E_INVALIDARG\n", hr);
"returned 0x%08x, expected E_INVALIDARG\n", hr);
}
static void testSHGetSpecialFolderPathInvalidArgs(void)
......@@ -399,7 +399,7 @@ static BYTE testSHGetFolderLocation(BOOL optional, int folder)
hr = pSHGetFolderLocation(NULL, folder, NULL, 0, &pidl);
ok(SUCCEEDED(hr) || optional,
"SHGetFolderLocation(NULL, %s, NULL, 0, &pidl)\n"
"failed: 0x%08lx\n", getFolderName(folder), hr);
"failed: 0x%08x\n", getFolderName(folder), hr);
if (SUCCEEDED(hr))
{
ok(pidl != NULL,
......@@ -433,7 +433,7 @@ static BYTE testSHGetSpecialFolderLocation(BOOL optional, int folder)
hr = pSHGetSpecialFolderLocation(NULL, folder, &pidl);
ok(SUCCEEDED(hr) || optional,
"SHGetSpecialFolderLocation(NULL, %s, &pidl)\n"
"failed: 0x%08lx\n", getFolderName(folder), hr);
"failed: 0x%08x\n", getFolderName(folder), hr);
if (SUCCEEDED(hr))
{
ok(pidl != NULL,
......@@ -463,7 +463,7 @@ static void testSHGetFolderPath(BOOL optional, int folder)
hr = pSHGetFolderPathA(NULL, folder, NULL, SHGFP_TYPE_CURRENT, path);
ok(SUCCEEDED(hr) || optional,
"SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path)\n"
"failed: 0x%08lx\n", getFolderName(folder), hr);
"failed: 0x%08x\n", getFolderName(folder), hr);
}
static void testSHGetSpecialFolderPath(BOOL optional, int folder)
......@@ -723,19 +723,19 @@ static void testNonExistentPath1(void)
hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES, NULL,
SHGFP_TYPE_CURRENT, path);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
"SHGetFolderPath returned 0x%08lx, expected 0x80070002\n", hr);
"SHGetFolderPath returned 0x%08x, expected 0x80070002\n", hr);
pidl = NULL;
hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, NULL, 0,
&pidl);
ok(hr == E_FAIL,
"SHGetFolderLocation returned 0x%08lx, expected E_FAIL\n", hr);
"SHGetFolderLocation returned 0x%08x, expected E_FAIL\n", hr);
if (SUCCEEDED(hr) && pidl)
IMalloc_Free(pMalloc, pidl);
ok(!pSHGetSpecialFolderPathA(NULL, path, CSIDL_FAVORITES, FALSE),
"SHGetSpecialFolderPath succeeded, expected failure\n");
pidl = NULL;
hr = pSHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidl);
ok(hr == E_FAIL, "SHGetFolderLocation returned 0x%08lx, expected E_FAIL\n",
ok(hr == E_FAIL, "SHGetFolderLocation returned 0x%08x, expected E_FAIL\n",
hr);
if (SUCCEEDED(hr) && pidl)
IMalloc_Free(pMalloc, pidl);
......@@ -754,13 +754,13 @@ static void testNonExistentPath1(void)
"with ERROR_ALREADY_EXISTS\n");
if (!ret)
ok(GetLastError() == ERROR_ALREADY_EXISTS,
"CreateDirectoryA failed with %ld, "
"CreateDirectoryA failed with %d, "
"expected ERROR_ALREADY_EXISTS\n",
GetLastError());
}
ok(SUCCEEDED(hr),
"SHGetFolderPath(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, "
"NULL, SHGFP_TYPE_CURRENT, path)\nfailed: 0x%08lx\n", hr);
"NULL, SHGFP_TYPE_CURRENT, path)\nfailed: 0x%08x\n", hr);
}
/* Subprocess helper 2: make sure SHGetFolderPath still succeeds when the
......@@ -773,7 +773,7 @@ static void testNonExistentPath2(void)
hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL,
SHGFP_TYPE_CURRENT, path);
ok(SUCCEEDED(hr), "SHGetFolderPath failed: 0x%08lx\n", hr);
ok(SUCCEEDED(hr), "SHGetFolderPath failed: 0x%08x\n", hr);
}
static void doChild(const char *arg)
......@@ -849,7 +849,7 @@ static void testNonExistentPath(void)
/* Query the path to be able to delete it below */
hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES, NULL,
SHGFP_TYPE_CURRENT, modifiedPath);
ok(SUCCEEDED(hr), "SHGetFolderPathA failed: 0x%08lx\n", hr);
ok(SUCCEEDED(hr), "SHGetFolderPathA failed: 0x%08x\n", hr);
/* restore original values: */
if (winetest_interactive)
......
......@@ -546,12 +546,12 @@ static void test_filename(void)
rc=0;
if ((test->todo & 0x1)==0)
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
else todo_wine
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
if (rc==0)
......@@ -595,12 +595,12 @@ static void test_filename(void)
rc=0;
if ((test->todo & 0x1)==0)
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
else todo_wine
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
if (rc==0)
......@@ -664,7 +664,7 @@ static void test_filename(void)
*/
sprintf(filename, "\"%s\\test file.shlexec\"", tmpdir);
rc=shell_execute(NULL, filename, NULL, NULL);
ok(rc>=32, "%s failed: rc=%d err=%ld\n", shell_call, rc,
ok(rc>=32, "%s failed: rc=%d err=%d\n", shell_call, rc,
GetLastError());
okChildInt("argcA", 5);
okChildString("argvA3", "Open");
......@@ -699,7 +699,7 @@ static void test_lnks(void)
sprintf(filename, "%s\\test_shortcut_shlexec.lnk", tmpdir);
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL);
ok(rc>=32, "%s failed: rc=%d err=%ld\n", shell_call, rc,
ok(rc>=32, "%s failed: rc=%d err=%d\n", shell_call, rc,
GetLastError());
okChildInt("argcA", 5);
okChildString("argvA3", "Open");
......@@ -708,7 +708,7 @@ static void test_lnks(void)
sprintf(filename, "%s\\test_shortcut_exe.lnk", tmpdir);
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL);
ok(rc>=32, "%s failed: rc=%d err=%ld\n", shell_call, rc,
ok(rc>=32, "%s failed: rc=%d err=%d\n", shell_call, rc,
GetLastError());
okChildInt("argcA", 4);
okChildString("argvA3", "Lnk");
......@@ -728,7 +728,7 @@ static void test_lnks(void)
c++;
}
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL);
ok(rc>=32, "%s failed: rc=%d err=%ld\n", shell_call, rc,
ok(rc>=32, "%s failed: rc=%d err=%d\n", shell_call, rc,
GetLastError());
okChildInt("argcA", 4);
okChildString("argvA3", "Lnk");
......@@ -747,12 +747,12 @@ static void test_lnks(void)
rc=0;
if ((test->todo & 0x1)==0)
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
else todo_wine
{
ok(rc==test->rc, "%s failed: rc=%d err=%ld\n", shell_call,
ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
rc, GetLastError());
}
if (rc==0)
......@@ -832,7 +832,7 @@ static void init_test(void)
{
dllver.cbSize=sizeof(dllver);
pDllGetVersion(&dllver);
trace("major=%ld minor=%ld build=%ld platform=%ld\n",
trace("major=%d minor=%d build=%d platform=%d\n",
dllver.dwMajorVersion, dllver.dwMinorVersion,
dllver.dwBuildNumber, dllver.dwPlatformID);
}
......@@ -842,7 +842,7 @@ static void init_test(void)
}
r = CoInitialize(NULL);
ok(SUCCEEDED(r), "CoInitialize failed (0x%08lx)\n", r);
ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r);
if (!SUCCEEDED(r))
exit(1);
......@@ -870,7 +870,7 @@ static void init_test(void)
FILE_ATTRIBUTE_NORMAL, NULL);
if (hfile==INVALID_HANDLE_VALUE)
{
trace("unable to create '%s': err=%ld\n", filename, GetLastError());
trace("unable to create '%s': err=%d\n", filename, GetLastError());
assert(0);
}
CloseHandle(hfile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment