netapi32: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-10-08 19:35:50 +02:00 committed by Alexandre Julliard
parent 54b1c5e0fa
commit 611220d554
5 changed files with 23 additions and 24 deletions

View File

@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = netapi32.dll
IMPORTS = netapi32 advapi32 kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
access.c \

View File

@ -79,7 +79,7 @@ static void run_usergetinfo_tests(void)
/* Level 0 */
rc=pNetUserGetInfo(NULL, sAdminUserName, 0, (LPBYTE *)&ui0);
if (rc != NERR_Success) {
trace ("Aborting usergetinfo_tests(). NetUserGetInfo: rc=%ld\n", rc);
trace ("Aborting usergetinfo_tests(). NetUserGetInfo: rc=%d\n", rc);
return;
}
ok(!lstrcmpW(sAdminUserName, ui0->usri0_name), "This is really user name\n");
@ -90,7 +90,7 @@ static void run_usergetinfo_tests(void)
/* Level 10 */
rc=pNetUserGetInfo(NULL, sAdminUserName, 10, (LPBYTE *)&ui10);
ok(rc == NERR_Success, "NetUserGetInfo: rc=%ld\n", rc);
ok(rc == NERR_Success, "NetUserGetInfo: rc=%d\n", rc);
ok(!lstrcmpW(sAdminUserName, ui10->usri10_name), "This is really user name\n");
pNetApiBufferSize(ui10, &dwSize);
ok(dwSize >= (sizeof(USER_INFO_10) +
@ -105,22 +105,22 @@ static void run_usergetinfo_tests(void)
/* errors handling */
rc=pNetUserGetInfo(NULL, sAdminUserName, 10000, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_LEVEL,"Invalid Level: rc=%ld\n",rc);
ok(rc == ERROR_INVALID_LEVEL,"Invalid Level: rc=%d\n",rc);
rc=pNetUserGetInfo(NULL, sNonexistentUser, 0, (LPBYTE *)&ui0);
ok(rc == NERR_UserNotFound,"Invalid User Name: rc=%ld\n",rc);
ok(rc == NERR_UserNotFound,"Invalid User Name: rc=%d\n",rc);
todo_wine {
/* FIXME - Currently Wine can't verify whether the network path is good or bad */
rc=pNetUserGetInfo(sBadNetPath, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH || rc == ERROR_NETWORK_UNREACHABLE,
"Bad Network Path: rc=%ld\n",rc);
"Bad Network Path: rc=%d\n",rc);
}
rc=pNetUserGetInfo(sEmptyStr, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success,
"Bad Network Path: rc=%ld\n",rc);
"Bad Network Path: rc=%d\n",rc);
rc=pNetUserGetInfo(sInvalidName, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%ld\n",rc);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc);
rc=pNetUserGetInfo(sInvalidName2, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%ld\n",rc);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc);
}
/* checks Level 1 of NetQueryDisplayInformation */
@ -177,7 +177,7 @@ static void run_usermodalsget_tests(void)
USER_MODALS_INFO_2 * umi2 = NULL;
rc = pNetUserModalsGet(NULL, 2, (LPBYTE *)&umi2);
ok(rc == ERROR_SUCCESS, "NetUserModalsGet failed, rc = %ld\n", rc);
ok(rc == ERROR_SUCCESS, "NetUserModalsGet failed, rc = %d\n", rc);
if (umi2)
pNetApiBufferFree(umi2);

View File

@ -83,13 +83,13 @@ static void run_apibuf_tests(void)
SetLastError(0xdeadbeef);
res = pNetApiBufferAllocate(0, (LPVOID *)NULL);
ok( (res == ERROR_INVALID_PARAMETER) && (GetLastError() == 0xdeadbeef),
"returned %ld with 0x%lx (expected ERROR_INVALID_PARAMETER with " \
"returned %d with 0x%x (expected ERROR_INVALID_PARAMETER with " \
"0xdeadbeef)\n", res, GetLastError());
SetLastError(0xdeadbeef);
res = pNetApiBufferAllocate(1024, (LPVOID *)NULL);
ok( (res == ERROR_INVALID_PARAMETER) && (GetLastError() == 0xdeadbeef),
"returned %ld with 0x%lx (expected ERROR_INVALID_PARAMETER with " \
"returned %d with 0x%x (expected ERROR_INVALID_PARAMETER with " \
"0xdeadbeef)\n", res, GetLastError());
}

View File

@ -36,18 +36,18 @@ static void test_params(void)
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, NULL);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%ld)\n", ret);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret);
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, 0, NULL);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%ld)\n", ret);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret);
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, 4, NULL);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%ld)\n", ret);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret);
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, 4, (PBYTE *)&dpdi);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%ld)\n", ret);
ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret);
}
static void test_get(void)
@ -59,17 +59,17 @@ static void test_get(void)
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *)&dpdi);
ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%ld)\n", ret);
ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret);
pDsRoleFreeMemory(&dpdi);
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleUpgradeStatus, (PBYTE *)&dusi);
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%ld)\n", ret); }
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); }
pDsRoleFreeMemory(&dusi);
SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleOperationState, (PBYTE *)&dosi);
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%ld)\n", ret); }
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); }
pDsRoleFreeMemory(&dosi);
}
@ -86,7 +86,7 @@ START_TEST(ds)
pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
if (!pDsRoleGetPrimaryDomainInformation)
{
trace("DsRoleGetPrimaryDomainInformation not implemented : (%ld), stop testing\n", GetLastError());
trace("DsRoleGetPrimaryDomainInformation not implemented : (%d), stop testing\n", GetLastError());
return;
}
pDsRoleFreeMemory=(void*)GetProcAddress(hnetapi32,"DsRoleFreeMemory");

View File

@ -135,7 +135,7 @@ static void run_wkstatransportenum_tests(void)
apiReturn = pNetWkstaTransportEnum(NULL, 1, NULL, MAX_PREFERRED_LENGTH,
NULL, &totalEntries, NULL);
ok(apiReturn == ERROR_INVALID_LEVEL || apiReturn == ERROR_INVALID_PARAMETER,
"NetWkstaTransportEnum returned %ld\n", apiReturn);
"NetWkstaTransportEnum returned %d\n", apiReturn);
/* 2nd check: is param 5 passed? (only if level passes?) */
apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH,
@ -146,13 +146,13 @@ static void run_wkstatransportenum_tests(void)
return;
ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == ERROR_INVALID_PARAMETER,
"NetWkstaTransportEnum returned %ld\n", apiReturn);
"NetWkstaTransportEnum returned %d\n", apiReturn);
/* 3rd check: is param 3 passed? */
apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH,
NULL, NULL, NULL);
ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == RPC_X_NULL_REF_POINTER || apiReturn == ERROR_INVALID_PARAMETER,
"NetWkstaTransportEnum returned %ld\n", apiReturn);
"NetWkstaTransportEnum returned %d\n", apiReturn);
/* 4th check: is param 6 passed? */
apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH,
@ -163,7 +163,7 @@ static void run_wkstatransportenum_tests(void)
apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH,
&entriesRead, &totalEntries, NULL);
ok(apiReturn == NERR_Success || apiReturn == ERROR_NETWORK_UNREACHABLE,
"NetWkstaTransportEnum returned %ld\n", apiReturn);
"NetWkstaTransportEnum returned %d\n", apiReturn);
if (apiReturn == NERR_Success) {
/* WKSTA_TRANSPORT_INFO_0 *transports = (WKSTA_TRANSPORT_INFO_0 *)bufPtr; */