gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355).

Original commit message from CVS:
* gst/modplug/libmodplug/load_ptm.cpp:
Fix compilation with gcc-4.1 and -Werror (#327355).
This commit is contained in:
Tim-Philipp Müller 2006-03-21 16:02:09 +00:00
parent 353131d32d
commit 2fd4b22a83
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2006-03-21 Tim-Philipp Müller <tim at centricular dot net>
* gst/modplug/libmodplug/load_ptm.cpp:
Fix compilation with gcc-4.1 and -Werror (#327355).
2006-03-20 Tim-Philipp Müller <tim at centricular dot net>
* ext/taglib/gsttaglib.h:

View file

@ -120,10 +120,15 @@ BOOL CSoundFile::ReadPTM(const BYTE *lpStream, DWORD dwMemLength)
{
UINT smpflg = RS_PCM8D;
DWORD samplepos;
pins->nLength = bswapLE32(*(LPDWORD)(psmp->length));
pins->nLoopStart = bswapLE32(*(LPDWORD)(psmp->loopbeg));
pins->nLoopEnd = bswapLE32(*(LPDWORD)(psmp->loopend));
samplepos = bswapLE32(*(LPDWORD)(&psmp->fileofs));
DWORD psmp_length, psmp_loopbeg, psmp_loopend, psmp_fileofs;
memcpy (&psmp_length, (void *) psmp->length, sizeof (DWORD));
memcpy (&psmp_loopbeg, (void *) psmp->loopbeg, sizeof (DWORD));
memcpy (&psmp_loopend, (void *) psmp->loopend, sizeof (DWORD));
memcpy (&psmp_fileofs, (void *) psmp->fileofs, sizeof (DWORD));
pins->nLength = bswapLE32(psmp_length);
pins->nLoopStart = bswapLE32(psmp_loopbeg);
pins->nLoopEnd = bswapLE32(psmp_loopend);
samplepos = bswapLE32(psmp_fileofs);
if (psmp->sampletype & 4) pins->uFlags |= CHN_LOOP;
if (psmp->sampletype & 8) pins->uFlags |= CHN_PINGPONGLOOP;
if (psmp->sampletype & 16)