From 34a323dc885e4a78159ae97c4898621f7c09e7fa Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 8 Oct 2006 23:52:35 +0200 Subject: [PATCH] dmscript: Win64 printf format warning fixes. --- dlls/dmscript/Makefile.in | 1 - dlls/dmscript/dmscript_main.c | 4 ++-- dlls/dmscript/script.c | 32 ++++++++++++++++---------------- dlls/dmscript/scripttrack.c | 18 +++++++++--------- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dlls/dmscript/Makefile.in b/dlls/dmscript/Makefile.in index 3be1be6ba0b..24337d19df4 100644 --- a/dlls/dmscript/Makefile.in +++ b/dlls/dmscript/Makefile.in @@ -5,7 +5,6 @@ VPATH = @srcdir@ MODULE = dmscript.dll IMPORTS = ole32 user32 advapi32 kernel32 EXTRALIBS = -ldxguid -luuid -EXTRADEFS = -DWINE_NO_LONG_AS_INT C_SRCS = \ dmscript_main.c \ diff --git a/dlls/dmscript/dmscript_main.c b/dlls/dmscript/dmscript_main.c index 5980e00946c..1ccaebf8205 100644 --- a/dlls/dmscript/dmscript_main.c +++ b/dlls/dmscript/dmscript_main.c @@ -968,7 +968,7 @@ const char *debugstr_dmreturn (DWORD code) { return codes[i].name; } /* if we didn't find it, return value */ - return wine_dbg_sprintf("0x%08lx", code); + return wine_dbg_sprintf("0x%08x", code); } /* generic flag-dumping function */ @@ -1015,7 +1015,7 @@ const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) { char buffer[1024] = "", *ptr = &buffer[0]; ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):\n", pDesc); - ptr += sprintf(ptr, " - dwSize = %ld\n", pDesc->dwSize); + ptr += sprintf(ptr, " - dwSize = %d\n", pDesc->dwSize); ptr += sprintf(ptr, " - dwValidData = %s\n", debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData)); if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, " - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass)); if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, " - guidObject = %s\n", debugstr_guid(&pDesc->guidObject)); diff --git a/dlls/dmscript/script.c b/dlls/dmscript/script.c index 1ae499a60c0..2705461f344 100644 --- a/dlls/dmscript/script.c +++ b/dlls/dmscript/script.c @@ -70,7 +70,7 @@ static ULONG WINAPI IDirectMusicScriptImpl_IUnknown_AddRef (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicScriptImpl, UnknownVtbl, iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %ld\n", This, ref - 1); + TRACE("(%p): AddRef from %d\n", This, ref - 1); DMSCRIPT_LockModule(); @@ -81,7 +81,7 @@ static ULONG WINAPI IDirectMusicScriptImpl_IUnknown_Release (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicScriptImpl, UnknownVtbl, iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %ld\n", This, ref); + TRACE("(%p): ReleaseRef to %d\n", This, ref); if (ref == 0) { HeapFree(GetProcessHeap(), 0, This->pHeader); @@ -147,7 +147,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicScript_GetVariableVaria static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicScript_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo) { ICOM_THIS_MULTI(IDirectMusicScriptImpl, ScriptVtbl, iface); - FIXME("(%p, %s, %li, %p): stub\n", This, debugstr_w(pwszVariableName), lValue, pErrorInfo); + FIXME("(%p, %s, %i, %p): stub\n", This, debugstr_w(pwszVariableName), lValue, pErrorInfo); return S_OK; } @@ -171,13 +171,13 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicScript_GetVariableObjec static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicScript_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName) { ICOM_THIS_MULTI(IDirectMusicScriptImpl, ScriptVtbl, iface); - FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName); + FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); return S_OK; } static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicScript_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName) { ICOM_THIS_MULTI(IDirectMusicScriptImpl, ScriptVtbl, iface); - FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName); + FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); return S_OK; } @@ -268,7 +268,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_ParseDescriptor memcpy (&pDesc->guidClass, &CLSID_DirectMusicScript, sizeof(CLSID)); IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); - TRACE_(dmfile)(": %s chunk (size = 0x%04lx)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { case FOURCC_RIFF: { IStream_Read (pStream, &Chunk.fccID, sizeof(FOURCC), NULL); @@ -280,7 +280,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_ParseDescriptor do { IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; - TRACE_(dmfile)(": %s chunk (size = 0x%04lx)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { case DMUS_FOURCC_GUID_CHUNK: { TRACE_(dmfile)(": GUID chunk\n"); @@ -312,7 +312,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_ParseDescriptor do { IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; - TRACE_(dmfile)(": %s chunk (size = 0x%04lx)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { /* don't ask me why, but M$ puts INFO elements in UNFO list sometimes (though strings seem to be valid unicode) */ @@ -358,7 +358,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_ParseDescriptor break; } } - TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]); + TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); } while (ListCount[0] < ListSize[0]); break; } @@ -378,7 +378,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_ParseDescriptor break; } } - TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize); + TRACE_(dmfile)(": StreamCount[0] = %d < StreamSize[0] = %d\n", StreamCount, StreamSize); } while (StreamCount < StreamSize); } else { TRACE_(dmfile)(": unexpected chunk; loading failed)\n"); @@ -452,7 +452,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA FIXME("(%p, %p): Loading not implemented yet\n", This, pStm); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); - TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { case FOURCC_RIFF: { IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); @@ -465,7 +465,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA do { IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; - TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { case DMUS_FOURCC_SCRIPT_CHUNK: { TRACE_(dmfile)(": script header chunk\n"); @@ -477,7 +477,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA TRACE_(dmfile)(": script version chunk\n"); This->pVersion = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, Chunk.dwSize); IStream_Read (pStm, This->pVersion, Chunk.dwSize, NULL); - TRACE_(dmfile)("version: 0x%08lx.0x%08lx\n", This->pVersion->dwVersionMS, This->pVersion->dwVersionLS); + TRACE_(dmfile)("version: 0x%08x.0x%08x\n", This->pVersion->dwVersionMS, This->pVersion->dwVersionLS); break; } case DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK: { @@ -578,7 +578,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA do { IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; - TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { /* don't ask me why, but M$ puts INFO elements in UNFO list sometimes (though strings seem to be valid unicode) */ @@ -624,7 +624,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA break; } } - TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]); + TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); } while (ListCount[0] < ListSize[0]); break; } @@ -644,7 +644,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREA break; } } - TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize); + TRACE_(dmfile)(": StreamCount[0] = %d < StreamSize[0] = %d\n", StreamCount, StreamSize); } while (StreamCount < StreamSize); break; } diff --git a/dlls/dmscript/scripttrack.c b/dlls/dmscript/scripttrack.c index 84c33bb16b6..7c6d2d32d04 100644 --- a/dlls/dmscript/scripttrack.c +++ b/dlls/dmscript/scripttrack.c @@ -56,7 +56,7 @@ static ULONG WINAPI IDirectMusicScriptTrack_IUnknown_AddRef (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, UnknownVtbl, iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %ld\n", This, ref - 1); + TRACE("(%p): AddRef from %d\n", This, ref - 1); DMSCRIPT_LockModule(); @@ -67,7 +67,7 @@ static ULONG WINAPI IDirectMusicScriptTrack_IUnknown_Release (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, UnknownVtbl, iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %ld\n", This, ref); + TRACE("(%p): ReleaseRef to %d\n", This, ref); if (ref == 0) { HeapFree(GetProcessHeap(), 0, This); @@ -110,7 +110,7 @@ static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_Init (LPDIRECTMU static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags); + FIXME("(%p, %p, %p, %p, %d, %d): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags); return S_OK; } @@ -124,7 +124,7 @@ static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_EndPlay (LPDIREC static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_Play (LPDIRECTMUSICTRACK8 iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID); + FIXME("(%p, %p, %ld, %ld, %ld, %d, %p, %p, %d): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID); return S_OK; } @@ -169,34 +169,34 @@ static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_Clone (LPDIRECTM static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_PlayEx (LPDIRECTMUSICTRACK8 iface, void* pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %ld, %p, %p, %ld): stub\n", This, pStateData, wine_dbgstr_longlong(rtStart), + FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %d, %p, %p, %d): stub\n", This, pStateData, wine_dbgstr_longlong(rtStart), wine_dbgstr_longlong(rtEnd), wine_dbgstr_longlong(rtOffset), dwFlags, pPerf, pSegSt, dwVirtualID); return S_OK; } static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %s, 0x%s, %p, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), + FIXME("(%p, %s, 0x%s, %p, %p, %p, %d): stub\n", This, debugstr_dmguid(rguidType), wine_dbgstr_longlong(rtTime), prtNext, pParam, pStateData, dwFlags); return S_OK; } static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %s, 0x%s, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), + FIXME("(%p, %s, 0x%s, %p, %p, %d): stub\n", This, debugstr_dmguid(rguidType), wine_dbgstr_longlong(rtTime), pParam, pStateData, dwFlags); return S_OK; } static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %p, %ld, %p): stub\n", This, pContext, dwTrackGroup, ppResultTrack); + FIXME("(%p, %p, %d, %p): stub\n", This, pContext, dwTrackGroup, ppResultTrack); return S_OK; } static HRESULT WINAPI IDirectMusicScriptTrack_IDirectMusicTrack_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) { ICOM_THIS_MULTI(IDirectMusicScriptTrack, TrackVtbl, iface); - FIXME("(%p, %p, %ld, %p, %ld, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack); + FIXME("(%p, %p, %ld, %p, %d, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack); return S_OK; }