dmime: Avoid idempotent operation (Clang) (try 2)

Frédéric Delanoy frederic.delanoy at gmail.com
Mon Oct 10 19:29:09 CDT 2011


"The left operand to '-=' is always 0"

try 2: avoid issues with signed/unsigned mix

---
 dlls/dmime/segment.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index df3c2a6..e5f60f7 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -1226,8 +1226,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR
 
       IStream_Clone (pStm, &pClonedStream);
 	
-      liMove.QuadPart = 0;
-      liMove.QuadPart -= sizeof(FOURCC) + (sizeof(FOURCC)+sizeof(DWORD));
+      liMove.QuadPart = - (LONGLONG)(sizeof(FOURCC) * 2 + sizeof(DWORD));
       IStream_Seek (pClonedStream, liMove, STREAM_SEEK_CUR, NULL);
 	
       hr = IDirectMusicSegment8Impl_IPersistStream_LoadWave (iface, pClonedStream, &pWave);
-- 
1.7.7




More information about the wine-patches mailing list