Commit 65aac34c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound/tests: Win64 printf format warning fixes.

parent 699d4413
......@@ -5,7 +5,6 @@ VPATH = @srcdir@
TESTDLL = dsound.dll
IMPORTS = dsound ole32 version user32 kernel32
EXTRALIBS = -ldxguid -luuid -ldxerr8
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
capture.c \
......
......@@ -95,7 +95,7 @@ const char * format_string(const WAVEFORMATEX* wfx)
{
static char str[64];
sprintf(str, "%5ldx%2dx%d %s",
sprintf(str, "%5dx%2dx%d %s",
wfx->nSamplesPerSec, wfx->wBitsPerSample, wfx->nChannels,
get_format_str(wfx->wFormatTag));
......@@ -354,7 +354,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && winetest_debug > 1) {
trace(" Caps: size = %ld flags=0x%08lx buffer size=%ld\n",
trace(" Caps: size = %d flags=0x%08x buffer size=%d\n",
dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes);
}
......@@ -369,14 +369,14 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
size=0;
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,&size);
ok(rc==DS_OK && size!=0,"IDirectSoundCaptureBuffer_GetFormat() should "
"have returned the needed size: rc=%s, size=%ld\n",
"have returned the needed size: rc=%s, size=%d\n",
DXGetErrorString8(rc),size);
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL);
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && winetest_debug > 1) {
trace(" Format: tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n",
trace(" Format: tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample,
wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign);
}
......@@ -391,7 +391,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && winetest_debug > 1) {
trace(" Status=0x%04lx\n",status);
trace(" Status=0x%04x\n",status);
}
ZeroMemory(&state, sizeof(state));
......@@ -439,7 +439,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %s\n",
DXGetErrorString8(rc));
ok(status==(DSCBSTATUS_CAPTURING|DSCBSTATUS_LOOPING),
"GetStatus: bad status: %lx\n",status);
"GetStatus: bad status: %x\n",status);
if (rc!=DS_OK)
return;
......@@ -447,10 +447,10 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
for (i = 0; i < (NOTIFICATIONS * 2); i++) {
rc=WaitForMultipleObjects(NOTIFICATIONS,state.event,FALSE,3000);
ok(rc==(WAIT_OBJECT_0+(i%NOTIFICATIONS)),
"WaitForMultipleObjects failed: 0x%lx\n",rc);
"WaitForMultipleObjects failed: 0x%x\n",rc);
if (rc!=(WAIT_OBJECT_0+(i%NOTIFICATIONS))) {
ok((rc==WAIT_TIMEOUT)||(rc==WAIT_FAILED),
"Wrong notification: should be %d, got %ld\n",
"Wrong notification: should be %d, got %d\n",
i%NOTIFICATIONS,rc-WAIT_OBJECT_0);
}
if (!capture_buffer_service(&state))
......@@ -512,7 +512,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && winetest_debug > 1) {
trace(" Caps: size=%ld flags=0x%08lx formats=%05lx channels=%ld\n",
trace(" Caps: size=%d flags=0x%08x formats=%05x channels=%d\n",
dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats,
dsccaps.dwChannels);
}
......
......@@ -159,7 +159,7 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
DXGetErrorString8(rc));
if (rc==DS_OK && speaker_config!=new_speaker_config)
trace("IDirectSound_GetSpeakerConfig() failed to set speaker "
"config: expected 0x%08lx, got 0x%08lx\n",
"config: expected 0x%08x, got 0x%08x\n",
speaker_config,new_speaker_config);
}
......@@ -472,7 +472,7 @@ static HRESULT test_primary(LPGUID lpGuid)
trace("Playing a 5 seconds reference tone at the current "
"volume.\n");
if (rc==DS_OK)
trace("(the current volume is %ld according to DirectSound)\n",
trace("(the current volume is %d according to DirectSound)\n",
vol);
trace("All subsequent tones should be identical to this one.\n");
trace("Listen for stutter, changes in pitch, volume, etc.\n");
......@@ -576,11 +576,11 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
wfx.nSamplesPerSec!=wfx2.nSamplesPerSec ||
wfx.wBitsPerSample!=wfx2.wBitsPerSample ||
wfx.nChannels!=wfx2.nChannels)) {
trace("Requested primary format tag=0x%04x %ldx%dx%d "
"avg.B/s=%ld align=%d\n",
trace("Requested primary format tag=0x%04x %dx%dx%d "
"avg.B/s=%d align=%d\n",
wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample,
wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign);
trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n",
trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample,
wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign);
}
......@@ -601,8 +601,8 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx2;
if (winetest_interactive) {
trace(" Testing a primary buffer at %ldx%dx%d with a "
"secondary buffer at %ldx%dx%d\n",
trace(" Testing a primary buffer at %dx%dx%d with a "
"secondary buffer at %dx%dx%d\n",
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,
wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels);
}
......@@ -714,8 +714,8 @@ static HRESULT test_secondary(LPGUID lpGuid)
wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive) {
trace(" Testing a secondary buffer at %ldx%dx%d "
"with a primary buffer at %ldx%dx%d\n",
trace(" Testing a secondary buffer at %dx%dx%d "
"with a primary buffer at %dx%dx%d\n",
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,
wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels);
}
......@@ -790,8 +790,8 @@ static HRESULT test_block_align(LPGUID lpGuid)
"returned: %s\n", DXGetErrorString8(rc));
if (rc==DS_OK)
ok(dsbcaps.dwBufferBytes==(wfx.nAvgBytesPerSec + wfx.nBlockAlign),
"Buffer size not a multiple of nBlockAlign: requested %ld, "
"got %ld, should be %ld\n", bufdesc.dwBufferBytes,
"Buffer size not a multiple of nBlockAlign: requested %d, "
"got %d, should be %d\n", bufdesc.dwBufferBytes,
dsbcaps.dwBufferBytes, wfx.nAvgBytesPerSec + wfx.nBlockAlign);
ref=IDirectSoundBuffer_Release(secondary);
ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d references, "
......@@ -874,8 +874,8 @@ static HRESULT test_frequency(LPGUID lpGuid)
BUFFER_LEN/1000,wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive) {
trace(" Testing a secondary buffer at %ldx%dx%d "
"with a primary buffer at %ldx%dx%d\n",
trace(" Testing a secondary buffer at %dx%dx%d "
"with a primary buffer at %dx%dx%d\n",
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,
wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels);
}
......
......@@ -174,7 +174,7 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
DXGetErrorString8(rc));
if (rc==DS_OK && speaker_config!=new_speaker_config)
trace("IDirectSound8_GetSpeakerConfig() failed to set speaker "
"config: expected 0x%08lx, got 0x%08lx\n",
"config: expected 0x%08x, got 0x%08x\n",
speaker_config,new_speaker_config);
}
......@@ -503,7 +503,7 @@ static HRESULT test_primary8(LPGUID lpGuid)
if (winetest_interactive) {
trace("Playing a 5 seconds reference tone at the current volume.\n");
if (rc==DS_OK)
trace("(the current volume is %ld according to DirectSound)\n",
trace("(the current volume is %d according to DirectSound)\n",
vol);
trace("All subsequent tones should be identical to this one.\n");
trace("Listen for stutter, changes in pitch, volume, etc.\n");
......@@ -608,11 +608,11 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
wfx.nSamplesPerSec!=wfx2.nSamplesPerSec ||
wfx.wBitsPerSample!=wfx2.wBitsPerSample ||
wfx.nChannels!=wfx2.nChannels)) {
trace("Requested primary format tag=0x%04x %ldx%dx%d "
"avg.B/s=%ld align=%d\n",
trace("Requested primary format tag=0x%04x %dx%dx%d "
"avg.B/s=%d align=%d\n",
wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample,
wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign);
trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n",
trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample,
wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign);
}
......@@ -633,8 +633,8 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx2;
if (winetest_interactive) {
trace(" Testing a primary buffer at %ldx%dx%d with a "
"secondary buffer at %ldx%dx%d\n",
trace(" Testing a primary buffer at %dx%dx%d with a "
"secondary buffer at %dx%dx%d\n",
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,
wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels);
}
......@@ -746,8 +746,8 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive) {
trace(" Testing a secondary buffer at %ldx%dx%d "
"with a primary buffer at %ldx%dx%d\n",
trace(" Testing a secondary buffer at %dx%dx%d "
"with a primary buffer at %dx%dx%d\n",
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,
wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels);
}
......@@ -829,7 +829,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,
......
......@@ -124,7 +124,7 @@ static void IDirectSoundFullDuplex_tests(void)
CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex,
(void**)&dsfdo);
ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG||rc==CLASS_E_CLASSNOTAVAILABLE,
"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08lx)\n",
"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08x)\n",
DXGetErrorString8(rc), rc);
if (rc==REGDB_E_CLASSNOTREG) {
trace(" Class Not Registered\n");
......@@ -141,7 +141,7 @@ static void IDirectSoundFullDuplex_tests(void)
rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL,
CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex,
(void**)&dsfdo);
ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08lx)\n",
ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08x)\n",
DXGetErrorString8(rc), rc);
if (dsfdo)
IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultCapture,
......@@ -152,7 +152,7 @@ static void IDirectSoundFullDuplex_tests(void)
rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL,
CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex,
(void**)&dsfdo);
ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08lx)\n",
ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: %s (0x%08x)\n",
DXGetErrorString8(rc), rc);
if (dsfdo)
IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultVoiceCapture,
......@@ -165,7 +165,7 @@ static void IDirectSoundFullDuplex_tests(void)
(void**)&dsfdo);
ok(rc==E_NOINTERFACE,
"CoCreateInstance(CLSID_DirectSoundFullDuplex,CLSID_DirectSoundPrivate) "
"should have failed: %s (0x%08lx)\n",DXGetErrorString8(rc), rc);
"should have failed: %s (0x%08x)\n",DXGetErrorString8(rc), rc);
ZeroMemory(&wfex, sizeof(wfex));
wfex.wFormatTag = WAVE_FORMAT_PCM;
......
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