From 80c237677f72bbe6e25203161406faed4f91409f Mon Sep 17 00:00:00 2001 From: gpoirier Date: Fri, 26 Jan 2007 09:07:55 +0000 Subject: [PATCH] get rid of void pointer arithmetic, as spotted by ICC Original thread: date: Jan 25, 2007 5:01 PM subject: Re: [MPlayer-dev-eng] [PATCH] get rid of *void pointer arithemtic in libvo/fastmemcpy.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22018 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/fastmemcpy.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libvo/fastmemcpy.h b/libvo/fastmemcpy.h index 742b2b1cde..83d3c4582f 100644 --- a/libvo/fastmemcpy.h +++ b/libvo/fastmemcpy.h @@ -7,6 +7,7 @@ #if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \ /* || defined(HAVE_SSE) || defined(HAVE_SSE2) */ #include +#include extern void * fast_memcpy(void * to, const void * from, size_t len); extern void * mem2agpcpy(void * to, const void * from, size_t len); @@ -28,8 +29,8 @@ static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLi if(dstStride == srcStride) { if (srcStride < 0) { - src += (height-1)*srcStride; - dst += (height-1)*dstStride; + src = (uint8_t*)src + (height-1)*srcStride; + dst = (uint8_t*)dst + (height-1)*dstStride; srcStride = -srcStride; } @@ -40,8 +41,8 @@ static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLi for(i=0; i