winmm/wineesd: Win64 printf format warning fixes.
Michael Stefaniuc
mstefani at redhat.de
Fri Oct 6 15:59:08 CDT 2006
---
dlls/winmm/wineesd/Makefile.in | 1 -
dlls/winmm/wineesd/audio.c | 76 ++++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/dlls/winmm/wineesd/Makefile.in b/dlls/winmm/wineesd/Makefile.in
index 6f65b84..4ceb60e 100644
--- a/dlls/winmm/wineesd/Makefile.in
+++ b/dlls/winmm/wineesd/Makefile.in
@@ -6,7 +6,6 @@ MODULE = wineesd.drv
IMPORTS = winmm user32 kernel32
EXTRAINCL = @ESDINCL@
EXTRALIBS = @ESDLIBS@ -ldxguid -luuid
-EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \
esound.c \
diff --git a/dlls/winmm/wineesd/audio.c b/dlls/winmm/wineesd/audio.c
index ca053e0..d470033 100644
--- a/dlls/winmm/wineesd/audio.c
+++ b/dlls/winmm/wineesd/audio.c
@@ -295,19 +295,19 @@ void volume_effect8(void *bufin, void* b
static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position,
WAVEFORMATPCMEX* format)
{
- TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n",
+ TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%u nChannels=%u nAvgBytesPerSec=%u\n",
lpTime->wType, format->Format.wBitsPerSample, format->Format.nSamplesPerSec,
format->Format.nChannels, format->Format.nAvgBytesPerSec);
- TRACE("Position in bytes=%lu\n", position);
+ TRACE("Position in bytes=%u\n", position);
switch (lpTime->wType) {
case TIME_SAMPLES:
lpTime->u.sample = position / (format->Format.wBitsPerSample / 8 * format->Format.nChannels);
- TRACE("TIME_SAMPLES=%lu\n", lpTime->u.sample);
+ TRACE("TIME_SAMPLES=%u\n", lpTime->u.sample);
break;
case TIME_MS:
lpTime->u.ms = 1000.0 * position / (format->Format.wBitsPerSample / 8 * format->Format.nChannels * format->Format.nSamplesPerSec);
- TRACE("TIME_MS=%lu\n", lpTime->u.ms);
+ TRACE("TIME_MS=%u\n", lpTime->u.ms);
break;
case TIME_SMPTE:
lpTime->u.smpte.fps = 30;
@@ -331,7 +331,7 @@ static DWORD bytes_to_mmtime(LPMMTIME lp
/* fall through */
case TIME_BYTES:
lpTime->u.cb = position;
- TRACE("TIME_BYTES=%lu\n", lpTime->u.cb);
+ TRACE("TIME_BYTES=%u\n", lpTime->u.cb);
break;
}
return MMSYSERR_NOERROR;
@@ -672,7 +672,7 @@ static int ESD_RetrieveRingMessage(ESD_M
*/
static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
{
- TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2);
+ TRACE("wMsg = 0x%04x dwParm1 = %04X dwParam2 = %04X\n", wMsg, dwParam1, dwParam2);
switch (wMsg) {
case WOM_OPEN:
@@ -722,7 +722,7 @@ static void wodPlayer_BeginWaveHdr(WINE_
WARN("Already in a loop. Discarding loop on this header (%p)\n", lpWaveHdr);
TRACE("Already in a loop. Discarding loop on this header (%p)\n", lpWaveHdr);
} else {
- TRACE("Starting loop (%ldx) with %p\n", lpWaveHdr->dwLoops, lpWaveHdr);
+ TRACE("Starting loop (%dx) with %p\n", lpWaveHdr->dwLoops, lpWaveHdr);
wwo->lpLoopPtr = lpWaveHdr;
/* Windows does not touch WAVEHDR.dwLoops,
* so we need to make an internal copy */
@@ -789,7 +789,7 @@ static DWORD wodPlayer_NotifyWait(const
if(!dwMillis) dwMillis = 1;
}
- TRACE("dwMillis = %ld\n", dwMillis);
+ TRACE("dwMillis = %d\n", dwMillis);
return dwMillis;
}
@@ -807,7 +807,7 @@ static int wodPlayer_WriteMaxFrags(WINE_
int toWrite = min(dwLength, *bytes);
int written;
- TRACE("Writing wavehdr %p.%lu[%lu]\n",
+ TRACE("Writing wavehdr %p.%u[%u]\n",
wwo->lpPlayPtr, wwo->dwPartialOffset, wwo->lpPlayPtr->dwBufferLength);
/* see if our buffer isn't large enough for the data we are writing */
@@ -898,7 +898,7 @@ static DWORD wodPlayer_NotifyCompletions
LPWAVEHDR lpWaveHdr;
if (wwo->lpQueuePtr) {
- TRACE("lpWaveHdr=(%p), lpPlayPtr=(%p), lpLoopPtr=(%p), reserved=(%ld), dwWrittenTotal=(%ld), force=(%d)\n",
+ TRACE("lpWaveHdr=(%p), lpPlayPtr=(%p), lpLoopPtr=(%p), reserved=(%d), dwWrittenTotal=(%d), force=(%d)\n",
wwo->lpQueuePtr,
wwo->lpPlayPtr,
wwo->lpLoopPtr,
@@ -906,7 +906,7 @@ static DWORD wodPlayer_NotifyCompletions
wwo->dwWrittenTotal,
force);
} else {
- TRACE("lpWaveHdr=(%p), lpPlayPtr=(%p), lpLoopPtr=(%p), dwWrittenTotal=(%ld), force=(%d)\n",
+ TRACE("lpWaveHdr=(%p), lpPlayPtr=(%p), lpLoopPtr=(%p), dwWrittenTotal=(%d), force=(%d)\n",
wwo->lpQueuePtr,
wwo->lpPlayPtr,
wwo->lpLoopPtr,
@@ -1011,7 +1011,7 @@ static void wodPlayer_ProcessMessages(WI
HANDLE ev;
while (ESD_RetrieveRingMessage(&wwo->msgRing, &msg, ¶m, &ev)) {
- TRACE("Received %s %lx\n", wodPlayerCmdString[msg - WM_USER - 1], param);
+ TRACE("Received %s %x\n", wodPlayerCmdString[msg - WM_USER - 1], param);
switch (msg) {
case WINE_WM_PAUSING:
wodPlayer_Reset(wwo, FALSE);
@@ -1077,7 +1077,7 @@ static DWORD wodPlayer_FeedDSP(WINE_WAVE
wodUpdatePlayedTotal(wwo);
/* better way to set availInQ? */
availInQ = ESD_BUF_SIZE;
- TRACE("availInQ = %ld\n", availInQ);
+ TRACE("availInQ = %d\n", availInQ);
/* input queue empty */
if (!wwo->lpPlayPtr) {
@@ -1109,7 +1109,7 @@ #endif
TRACE("feeding waveheaders until we run out of space\n");
/* note the value that dwPlayedTotal will return when this wave finishes playing */
wwo->lpPlayPtr->reserved = wwo->dwWrittenTotal + wwo->lpPlayPtr->dwBufferLength;
- TRACE("reserved=(%ld) dwWrittenTotal=(%ld) dwBufferLength=(%ld)\n",
+ TRACE("reserved=(%d) dwWrittenTotal=(%d) dwBufferLength=(%d)\n",
wwo->lpPlayPtr->reserved,
wwo->dwWrittenTotal,
wwo->lpPlayPtr->dwBufferLength
@@ -1146,7 +1146,7 @@ static DWORD CALLBACK wodPlayer(LPVOID p
* are no pending actions, wait forever for a command.
*/
dwSleepTime = min(dwNextFeedTime, dwNextNotifyTime);
- TRACE("waiting %lums (%lu,%lu)\n", dwSleepTime, dwNextFeedTime, dwNextNotifyTime);
+ TRACE("waiting %ums (%u,%u)\n", dwSleepTime, dwNextFeedTime, dwNextNotifyTime);
WAIT_OMR(&wwo->msgRing, dwSleepTime);
wodPlayer_ProcessMessages(wwo);
if (wwo->state == WINE_WS_PLAYING) {
@@ -1163,7 +1163,7 @@ static DWORD CALLBACK wodPlayer(LPVOID p
*/
static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSW lpCaps, DWORD dwSize)
{
- TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
+ TRACE("(%u, %p, %u);\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
@@ -1187,7 +1187,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVE
int out_mode = ESD_STREAM, out_func = ESD_PLAY;
esd_format_t out_format;
- TRACE("(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
+ TRACE("(%u, %p, %08X);\n", wDevID, lpDesc, dwFlags);
if (lpDesc == NULL) {
WARN("Invalid Parameter !\n");
return MMSYSERR_INVALPARAM;
@@ -1206,14 +1206,14 @@ static DWORD wodOpen(WORD wDevID, LPWAVE
/* only PCM format is supported so far... */
if (!supportedFormat(lpDesc->lpFormat)) {
- WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
+ WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d !\n",
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
lpDesc->lpFormat->nSamplesPerSec);
return WAVERR_BADFORMAT;
}
if (dwFlags & WAVE_FORMAT_QUERY) {
- TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
+ TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%d !\n",
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
lpDesc->lpFormat->nSamplesPerSec);
return MMSYSERR_NOERROR;
@@ -1262,7 +1262,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVE
if(wwo->esd_fd < 0) return MMSYSERR_ALLOCATED;
wwo->dwBufferSize = ESD_BUF_SIZE;
- TRACE("Buffer size is now (%ld)\n",wwo->dwBufferSize);
+ TRACE("Buffer size is now (%d)\n",wwo->dwBufferSize);
wwo->dwPlayedTotal = 0;
wwo->dwWrittenTotal = 0;
@@ -1287,10 +1287,10 @@ static DWORD wodOpen(WORD wDevID, LPWAVE
}
wwo->hStartUpEvent = INVALID_HANDLE_VALUE;
- TRACE("esd=0x%lx, dwBufferSize=%ld\n",
+ TRACE("esd=0x%lx, dwBufferSize=%d\n",
(long)wwo->esd_fd, wwo->dwBufferSize);
- TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
+ TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%u, nSamplesPerSec=%u, nChannels=%u nBlockAlign=%u!\n",
wwo->waveFormat.Format.wBitsPerSample, wwo->waveFormat.Format.nAvgBytesPerSec,
wwo->waveFormat.Format.nSamplesPerSec, wwo->waveFormat.Format.nChannels,
wwo->waveFormat.Format.nBlockAlign);
@@ -1338,7 +1338,7 @@ static DWORD wodClose(WORD wDevID)
*/
static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
{
- TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
+ TRACE("(%u, %p, %08X);\n", wDevID, lpWaveHdr, dwSize);
/* first, do the sanity checks... */
if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].esd_fd == -1) {
@@ -1436,7 +1436,7 @@ static DWORD wodGetPosition(WORD wDevID,
{
WINE_WAVEOUT* wwo;
- TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
+ TRACE("(%u, %p, %u);\n", wDevID, lpTime, uSize);
if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].esd_fd == -1) {
WARN("bad device ID !\n");
@@ -1497,7 +1497,7 @@ static DWORD wodSetVolume(WORD wDevID, D
left = (LOWORD(dwParam) * 100) / 0xFFFFl;
right = (HIWORD(dwParam) * 100) / 0xFFFFl;
- TRACE("(%u, %08lX);\n", wDevID, dwParam);
+ TRACE("(%u, %08X);\n", wDevID, dwParam);
WOutDev[wDevID].volume_left = left;
WOutDev[wDevID].volume_right = right;
@@ -1546,7 +1546,7 @@ static DWORD wodDevInterface(UINT wDevID
DWORD WINAPI ESD_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
- TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
+ TRACE("(%u, %04X, %08X, %08X, %08X);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
@@ -1631,7 +1631,7 @@ static DWORD widDevInterface(UINT wDevID
*/
static DWORD widNotifyClient(WINE_WAVEIN* wwi, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
{
- TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2);
+ TRACE("wMsg = 0x%04x dwParm1 = %04X dwParam2 = %04X\n", wMsg, dwParam1, dwParam2);
switch (wMsg) {
case WIM_OPEN:
@@ -1657,7 +1657,7 @@ static DWORD widNotifyClient(WINE_WAVEIN
*/
static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSW lpCaps, DWORD dwSize)
{
- TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
+ TRACE("(%u, %p, %u);\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
@@ -1688,7 +1688,7 @@ static DWORD CALLBACK widRecorder(LPVOID
/* make sleep time to be # of ms to record one packet */
dwSleepTime = (1024 * 1000) / wwi->waveFormat.Format.nAvgBytesPerSec;
- TRACE("sleeptime=%ld ms\n", dwSleepTime);
+ TRACE("sleeptime=%d ms\n", dwSleepTime);
for(;;) {
TRACE("wwi->lpQueuePtr=(%p), wwi->state=(%d)\n",wwi->lpQueuePtr,wwi->state);
@@ -1701,11 +1701,11 @@ static DWORD CALLBACK widRecorder(LPVOID
TRACE("read as much as we can\n");
while(wwi->lpQueuePtr)
{
- TRACE("attempt to read %ld bytes\n",lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded);
+ TRACE("attempt to read %d bytes\n",lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded);
bytesRead = read(wwi->esd_fd,
lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded,
lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded);
- TRACE("bytesRead=%ld\n",bytesRead);
+ TRACE("bytesRead=%d\n",bytesRead);
if (bytesRead == -1 && errno == EAGAIN)
bytesRead = 0;
if (bytesRead==0) break; /* So we can stop recording smoothly */
@@ -1739,7 +1739,7 @@ static DWORD CALLBACK widRecorder(LPVOID
while (ESD_RetrieveRingMessage(&wwi->msgRing, &msg, ¶m, &ev))
{
- TRACE("msg=%s param=0x%lx\n",wodPlayerCmdString[msg - WM_USER - 1], param);
+ TRACE("msg=%s param=0x%x\n",wodPlayerCmdString[msg - WM_USER - 1], param);
switch(msg) {
case WINE_WM_PAUSING:
wwi->state = WINE_WS_PAUSED;
@@ -1841,7 +1841,7 @@ #endif
esd_format_t in_format;
int mode;
- TRACE("(%u, %p %08lX);\n",wDevID, lpDesc, dwFlags);
+ TRACE("(%u, %p %08X);\n",wDevID, lpDesc, dwFlags);
if (lpDesc == NULL) {
WARN("Invalid Parametr (lpDesc == NULL)!\n");
return MMSYSERR_INVALPARAM;
@@ -1861,14 +1861,14 @@ #endif
/* only PCM format is support so far... */
if (!supportedFormat(lpDesc->lpFormat)) {
- WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
+ WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d !\n",
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
lpDesc->lpFormat->nSamplesPerSec);
return WAVERR_BADFORMAT;
}
if (dwFlags & WAVE_FORMAT_QUERY) {
- TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
+ TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%d !\n",
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
lpDesc->lpFormat->nSamplesPerSec);
return MMSYSERR_NOERROR;
@@ -1945,7 +1945,7 @@ #endif
}
wwi->hStartUpEvent = INVALID_HANDLE_VALUE;
- TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
+ TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%u, nSamplesPerSec=%u, nChannels=%u nBlockAlign=%u!\n",
wwi->waveFormat.Format.wBitsPerSample, wwi->waveFormat.Format.nAvgBytesPerSec,
wwi->waveFormat.Format.nSamplesPerSec, wwi->waveFormat.Format.nChannels,
wwi->waveFormat.Format.nBlockAlign);
@@ -1984,7 +1984,7 @@ static DWORD widClose(WORD wDevID)
*/
static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
{
- TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
+ TRACE("(%u, %p, %08X);\n", wDevID, lpWaveHdr, dwSize);
if (wDevID >= MAX_WAVEINDRV || WInDev[wDevID].state == WINE_WS_CLOSED) {
WARN("can't do it !\n");
@@ -2059,7 +2059,7 @@ static DWORD widReset(WORD wDevID)
DWORD WINAPI ESD_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
- TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
+ TRACE("(%u, %04X, %08X, %08X, %08X);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
case DRVM_INIT:
--
1.4.2.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061006/55d1fe49/attachment.pgp
More information about the wine-patches
mailing list