From 905ff8fdaada80406dfd70168450635f651c6dd8 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 27 Jan 2009 11:36:14 +0100 Subject: [PATCH] avifil32: Remove superfluous pointer casts. --- dlls/avifil32/avifile.c | 22 +++++++++++----------- dlls/avifil32/icmstream.c | 2 +- dlls/avifil32/wavfile.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index 9f668c6fc98..1719031394c 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -931,7 +931,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos, { IAVIStreamImpl *This = (IAVIStreamImpl *)iface; - LPBITMAPINFOHEADER lpbiNew = (LPBITMAPINFOHEADER)format; + LPBITMAPINFOHEADER lpbiNew = format; TRACE("(%p,%d,%p,%d)\n", iface, pos, format, formatsize); @@ -976,7 +976,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos, return AVIERR_OK; } else { MMCKINFO ck; - LPBITMAPINFOHEADER lpbiOld = (LPBITMAPINFOHEADER)This->lpFormat; + LPBITMAPINFOHEADER lpbiOld = This->lpFormat; RGBQUAD *rgbNew = (RGBQUAD*)((LPBYTE)lpbiNew + lpbiNew->biSize); AVIPALCHANGE *lppc = NULL; UINT n; @@ -1688,7 +1688,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) return AVIERR_MEMORY; pStream->cbHandlerData = ck.cksize; - if (mmioRead(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize) + if (mmioRead(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize) return AVIERR_FILEREAD; break; case ckidSTREAMFORMAT: @@ -1702,11 +1702,11 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) return AVIERR_MEMORY; pStream->cbFormat = ck.cksize; - if (mmioRead(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize) + if (mmioRead(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize) return AVIERR_FILEREAD; if (pStream->sInfo.fccType == streamtypeVIDEO) { - LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)pStream->lpFormat; + LPBITMAPINFOHEADER lpbi = pStream->lpFormat; /* some corrections to the video format */ if (lpbi->biClrUsed == 0 && lpbi->biBitCount <= 8) @@ -2059,7 +2059,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos, } else { if (mmioSeek(This->paf->hmmio, This->idxFrames[pos].dwChunkOffset + 2 * sizeof(DWORD), SEEK_SET) == -1) return AVIERR_FILEREAD; - if (mmioRead(This->paf->hmmio, (HPSTR)buffer, size) != size) + if (mmioRead(This->paf->hmmio, buffer, size) != size) return AVIERR_FILEREAD; } @@ -2206,7 +2206,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK) return AVIERR_FILEWRITE; if (pStream->lpFormat != NULL && ck.cksize > 0) { - if (mmioWrite(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize) + if (mmioWrite(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize) return AVIERR_FILEWRITE; } if (mmioAscend(This->hmmio, &ck, 0) != S_OK) @@ -2218,7 +2218,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) ck.cksize = pStream->cbHandlerData; if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK) return AVIERR_FILEWRITE; - if (mmioWrite(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize) + if (mmioWrite(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize) return AVIERR_FILEWRITE; if (mmioAscend(This->hmmio, &ck, 0) != S_OK) return AVIERR_FILEWRITE; @@ -2227,7 +2227,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) /* ... some optional additional extra chunk for this stream ... */ if (pStream->extra.lp != NULL && pStream->extra.cb > 0) { /* the chunk header(s) are already in the structure */ - if (mmioWrite(This->hmmio, (HPSTR)pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb) + if (mmioWrite(This->hmmio, pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb) return AVIERR_FILEWRITE; } @@ -2302,7 +2302,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) /* write optional extra file chunks */ if (This->fileextra.lp != NULL && This->fileextra.cb > 0) { /* as for the streams, are the chunk header(s) in the structure */ - if (mmioWrite(This->hmmio, (HPSTR)This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb) + if (mmioWrite(This->hmmio, This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb) return AVIERR_FILEWRITE; } @@ -2562,7 +2562,7 @@ static HRESULT AVIFILE_WriteBlock(IAVIStreamImpl *This, DWORD block, if (mmioCreateChunk(This->paf->hmmio, &ck, 0) != S_OK) return AVIERR_FILEWRITE; if (buffer != NULL && size > 0) { - if (mmioWrite(This->paf->hmmio, (HPSTR)buffer, size) != size) + if (mmioWrite(This->paf->hmmio, buffer, size) != size) return AVIERR_FILEWRITE; } if (mmioAscend(This->paf->hmmio, &ck, 0) != S_OK) diff --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c index 8276e41639f..dba120bd8eb 100644 --- a/dlls/avifil32/icmstream.c +++ b/dlls/avifil32/icmstream.c @@ -538,7 +538,7 @@ static HRESULT WINAPI ICMStream_fnSetFormat(IAVIStream *iface, LONG pos, } } else { /* format change -- check that's only the palette */ - LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)format; + LPBITMAPINFOHEADER lpbi = format; if (lpbi->biSize != This->lpbiInput->biSize || lpbi->biWidth != This->lpbiInput->biWidth || diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index d67ea7e89f9..2ec9b5e26d1 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -908,7 +908,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start, if (mmioSeek(This->hmmio, This->ckData.dwDataOffset + start * This->sInfo.dwSampleSize, SEEK_SET) == -1) return AVIERR_FILEREAD; - if (mmioRead(This->hmmio, (HPSTR)buffer, buffersize) != buffersize) + if (mmioRead(This->hmmio, buffer, buffersize) != buffersize) return AVIERR_FILEREAD; /* fill out return parameters if given */ @@ -960,7 +960,7 @@ static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream *iface, LONG start, if (mmioSeek(This->hmmio, This->ckData.dwDataOffset + start * This->sInfo.dwSampleSize, SEEK_SET) == -1) return AVIERR_FILEWRITE; - if (mmioWrite(This->hmmio, (HPSTR)buffer, buffersize) != buffersize) + if (mmioWrite(This->hmmio, buffer, buffersize) != buffersize) return AVIERR_FILEWRITE; This->sInfo.dwLength = max(This->sInfo.dwLength, (DWORD)start + samples);