From 611220d554e0a908b0b6933beb5d0fda299b87ca Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 8 Oct 2006 19:35:50 +0200 Subject: [PATCH] netapi32: Win64 printf format warning fixes. --- dlls/netapi32/tests/Makefile.in | 1 - dlls/netapi32/tests/access.c | 18 +++++++++--------- dlls/netapi32/tests/apibuf.c | 4 ++-- dlls/netapi32/tests/ds.c | 16 ++++++++-------- dlls/netapi32/tests/wksta.c | 8 ++++---- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/dlls/netapi32/tests/Makefile.in b/dlls/netapi32/tests/Makefile.in index 7abb0dae4d0..3c8971a90d5 100644 --- a/dlls/netapi32/tests/Makefile.in +++ b/dlls/netapi32/tests/Makefile.in @@ -4,7 +4,6 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = netapi32.dll IMPORTS = netapi32 advapi32 kernel32 -EXTRADEFS = -DWINE_NO_LONG_AS_INT CTESTS = \ access.c \ diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c index 7816aa8aef0..b625c374b25 100644 --- a/dlls/netapi32/tests/access.c +++ b/dlls/netapi32/tests/access.c @@ -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); diff --git a/dlls/netapi32/tests/apibuf.c b/dlls/netapi32/tests/apibuf.c index 871a4d317cc..4ef99c9d793 100644 --- a/dlls/netapi32/tests/apibuf.c +++ b/dlls/netapi32/tests/apibuf.c @@ -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()); } diff --git a/dlls/netapi32/tests/ds.c b/dlls/netapi32/tests/ds.c index 870afb1f362..7d0413dfde1 100644 --- a/dlls/netapi32/tests/ds.c +++ b/dlls/netapi32/tests/ds.c @@ -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"); diff --git a/dlls/netapi32/tests/wksta.c b/dlls/netapi32/tests/wksta.c index 3e9a501ff47..f8e9bb0f929 100644 --- a/dlls/netapi32/tests/wksta.c +++ b/dlls/netapi32/tests/wksta.c @@ -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; */