From 3438512f53c4ac663ad63f70fecdf2c3b15f70ec Mon Sep 17 00:00:00 2001 From: Michael Ploujnikov Date: Wed, 11 Oct 2006 20:22:27 -0400 Subject: [PATCH] dinput/tests: Win64 printf format warning fixes. --- dlls/dinput/tests/Makefile.in | 1 - dlls/dinput/tests/joystick.c | 12 ++++++------ dlls/dinput/tests/keyboard.c | 4 ++-- dlls/dinput/tests/mouse.c | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/dinput/tests/Makefile.in b/dlls/dinput/tests/Makefile.in index 9a8281aa342..ee0be9097db 100644 --- a/dlls/dinput/tests/Makefile.in +++ b/dlls/dinput/tests/Makefile.in @@ -5,7 +5,6 @@ VPATH = @srcdir@ TESTDLL = dinput.dll IMPORTS = dinput ole32 version user32 kernel32 EXTRALIBS = -ldxguid -luuid -ldxerr8 -EXTRADEFS = -DWINE_NO_LONG_AS_INT CTESTS = \ joystick.c \ diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index c186d0fc53e..a4658099d5e 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -141,7 +141,7 @@ static BOOL CALLBACK EnumJoysticks( HWND hWnd = get_hwnd(); char oldstate[248], curstate[248]; - ok(data->version > 0x0300, "Joysticks not supported in version 0x%04lx\n", data->version); + ok(data->version > 0x0300, "Joysticks not supported in version 0x%04x\n", data->version); hr = IDirectInput_CreateDevice(data->pDI, &lpddi->guidInstance, NULL, NULL); ok(hr==E_POINTER,"IDirectInput_CreateDevice() should have returned " @@ -270,8 +270,8 @@ static BOOL CALLBACK EnumJoysticks( DXGetErrorString8(hr)); if (hr != DI_OK) break; - sprintf(curstate, "X%5ld Y%5ld Z%5ld Rx%5ld Ry%5ld Rz%5ld " - "S0%5ld S1%5ld POV0%5ld POV1%5ld POV2%5ld POV3%5ld " + sprintf(curstate, "X%5d Y%5d Z%5d Rx%5d Ry%5d Rz%5d " + "S0%5d S1%5d POV0%5d POV1%5d POV2%5d POV3%5d " "B %d %d %d %d %d %d %d %d %d %d %d %d\n", js.lX, js.lY, js.lZ, js.lRx, js.lRy, js.lRz, js.rglSlider[0], js.rglSlider[1], @@ -295,7 +295,7 @@ static BOOL CALLBACK EnumJoysticks( RELEASE: ref = IDirectInputDevice_Release(pJoystick); - ok(ref==0,"IDirectInputDevice_Release() reference count = %ld\n", ref); + ok(ref==0,"IDirectInputDevice_Release() reference count = %d\n", ref); DONE: return DIENUM_CONTINUE; @@ -308,7 +308,7 @@ static void joystick_tests(DWORD version) ULONG ref; HINSTANCE hInstance = GetModuleHandle(NULL); - trace("-- Testing Direct Input Version 0x%04lx --\n", version); + trace("-- Testing Direct Input Version 0x%04x --\n", version); hr = DirectInputCreate(hInstance, version, &pDI, NULL); ok(hr==DI_OK||hr==DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreate() failed: %s\n", DXGetErrorString8(hr)); @@ -321,7 +321,7 @@ static void joystick_tests(DWORD version) ok(hr==DI_OK,"IDirectInput_EnumDevices() failed: %s\n", DXGetErrorString8(hr)); ref = IDirectInput_Release(pDI); - ok(ref==0,"IDirectInput_Release() reference count = %ld\n", ref); + ok(ref==0,"IDirectInput_Release() reference count = %d\n", ref); } else if (hr==DIERR_OLDDIRECTINPUTVERSION) trace(" Version Not Supported\n"); } diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c index 302e178d1b1..6b4a2fab48e 100644 --- a/dlls/dinput/tests/keyboard.c +++ b/dlls/dinput/tests/keyboard.c @@ -48,7 +48,7 @@ const char * get_file_version(const char * file_name) VS_FIXEDFILEINFO *pFixedVersionInfo; UINT len; if (VerQueryValueA(data, backslash, (LPVOID *)&pFixedVersionInfo, &len)) { - sprintf(version, "%ld.%ld.%ld.%ld", + sprintf(version, "%d.%d.%d.%d", pFixedVersionInfo->dwFileVersionMS >> 16, pFixedVersionInfo->dwFileVersionMS & 0xffff, pFixedVersionInfo->dwFileVersionLS >> 16, @@ -105,7 +105,7 @@ static void keyboard_tests(DWORD version) ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %s\n", DXGetErrorString8(hr)); ref = IDirectInput_Release(pDI); - ok(!ref, "IDirectInput_Release() reference count = %ld\n", ref); + ok(!ref, "IDirectInput_Release() reference count = %d\n", ref); } START_TEST(keyboard) diff --git a/dlls/dinput/tests/mouse.c b/dlls/dinput/tests/mouse.c index fa542b1e980..9da44a7bba0 100644 --- a/dlls/dinput/tests/mouse.c +++ b/dlls/dinput/tests/mouse.c @@ -83,7 +83,7 @@ static void mouse_tests(void) hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %ld\n", GetLastError()); + ok(hwnd != NULL, "err: %d\n", GetLastError()); if (!hwnd) return; ShowWindow(hwnd, SW_SHOW);