dinput/tests: Win64 printf format warning fixes.

This commit is contained in:
Michael Ploujnikov 2006-10-11 20:22:27 -04:00 committed by Alexandre Julliard
parent d7c0a0e38c
commit 3438512f53
4 changed files with 9 additions and 10 deletions

View File

@ -5,7 +5,6 @@ VPATH = @srcdir@
TESTDLL = dinput.dll TESTDLL = dinput.dll
IMPORTS = dinput ole32 version user32 kernel32 IMPORTS = dinput ole32 version user32 kernel32
EXTRALIBS = -ldxguid -luuid -ldxerr8 EXTRALIBS = -ldxguid -luuid -ldxerr8
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \ CTESTS = \
joystick.c \ joystick.c \

View File

@ -141,7 +141,7 @@ static BOOL CALLBACK EnumJoysticks(
HWND hWnd = get_hwnd(); HWND hWnd = get_hwnd();
char oldstate[248], curstate[248]; 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); hr = IDirectInput_CreateDevice(data->pDI, &lpddi->guidInstance, NULL, NULL);
ok(hr==E_POINTER,"IDirectInput_CreateDevice() should have returned " ok(hr==E_POINTER,"IDirectInput_CreateDevice() should have returned "
@ -270,8 +270,8 @@ static BOOL CALLBACK EnumJoysticks(
DXGetErrorString8(hr)); DXGetErrorString8(hr));
if (hr != DI_OK) if (hr != DI_OK)
break; break;
sprintf(curstate, "X%5ld Y%5ld Z%5ld Rx%5ld Ry%5ld Rz%5ld " sprintf(curstate, "X%5d Y%5d Z%5d Rx%5d Ry%5d Rz%5d "
"S0%5ld S1%5ld POV0%5ld POV1%5ld POV2%5ld POV3%5ld " "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", "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.lX, js.lY, js.lZ, js.lRx, js.lRy, js.lRz,
js.rglSlider[0], js.rglSlider[1], js.rglSlider[0], js.rglSlider[1],
@ -295,7 +295,7 @@ static BOOL CALLBACK EnumJoysticks(
RELEASE: RELEASE:
ref = IDirectInputDevice_Release(pJoystick); 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: DONE:
return DIENUM_CONTINUE; return DIENUM_CONTINUE;
@ -308,7 +308,7 @@ static void joystick_tests(DWORD version)
ULONG ref; ULONG ref;
HINSTANCE hInstance = GetModuleHandle(NULL); 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); hr = DirectInputCreate(hInstance, version, &pDI, NULL);
ok(hr==DI_OK||hr==DIERR_OLDDIRECTINPUTVERSION, ok(hr==DI_OK||hr==DIERR_OLDDIRECTINPUTVERSION,
"DirectInputCreate() failed: %s\n", DXGetErrorString8(hr)); "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", ok(hr==DI_OK,"IDirectInput_EnumDevices() failed: %s\n",
DXGetErrorString8(hr)); DXGetErrorString8(hr));
ref = IDirectInput_Release(pDI); 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) } else if (hr==DIERR_OLDDIRECTINPUTVERSION)
trace(" Version Not Supported\n"); trace(" Version Not Supported\n");
} }

View File

@ -48,7 +48,7 @@ const char * get_file_version(const char * file_name)
VS_FIXEDFILEINFO *pFixedVersionInfo; VS_FIXEDFILEINFO *pFixedVersionInfo;
UINT len; UINT len;
if (VerQueryValueA(data, backslash, (LPVOID *)&pFixedVersionInfo, &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 >> 16,
pFixedVersionInfo->dwFileVersionMS & 0xffff, pFixedVersionInfo->dwFileVersionMS & 0xffff,
pFixedVersionInfo->dwFileVersionLS >> 16, pFixedVersionInfo->dwFileVersionLS >> 16,
@ -105,7 +105,7 @@ static void keyboard_tests(DWORD version)
ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %s\n", DXGetErrorString8(hr)); ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %s\n", DXGetErrorString8(hr));
ref = IDirectInput_Release(pDI); 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) START_TEST(keyboard)

View File

@ -83,7 +83,7 @@ static void mouse_tests(void)
hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW,
10, 10, 200, 200, NULL, NULL, NULL, NULL); 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; if (!hwnd) return;
ShowWindow(hwnd, SW_SHOW); ShowWindow(hwnd, SW_SHOW);