[1/2] dmband: Assign to struct instead of using memcpy
Andrew Talbot
andrew.talbot at talbotville.com
Sat Feb 23 02:40:25 CST 2008
This patch will produce compiler warnings that certain variables may be used
unintialized elsewhere: specifically, variables header.dwVersion, header.lBandTime,
header.lBandTimeLogical and header.lBandTimePhysical in function
IDirectMusicBandTrack_IPersistStream_ParseBandsList(), which would appear to upset
function IDirectMusicBandTrack_IPersistStream_Load(). The accompanying patch is required
to suppress these warnings.
-- Andy.
---
Changelog:
dmband: Assign to struct instead of using memcpy.
diff --git a/dlls/dmband/bandtrack.c b/dlls/dmband/bandtrack.c
index f85d096..b471648 100644
--- a/dlls/dmband/bandtrack.c
+++ b/dlls/dmband/bandtrack.c
@@ -302,7 +302,7 @@ static HRESULT IDirectMusicBandTrack_IPersistStream_LoadBand (LPPERSISTSTREAM if
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
- memcpy(&pNewBand->BandHeader, pHeader, sizeof(DMUS_PRIVATE_BAND_ITEM_HEADER));
+ pNewBand->BandHeader = *pHeader;
pNewBand->pBand = (IDirectMusicBandImpl*)((char*)(*ppBand) - offsetof(IDirectMusicBandImpl,BandVtbl));
IDirectMusicBand_AddRef(*ppBand);
list_add_tail (&This->Bands, &pNewBand->entry);
More information about the wine-patches
mailing list