summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorgpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-26 09:07:55 +0000
committergpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-26 09:07:55 +0000
commit80c237677f72bbe6e25203161406faed4f91409f (patch)
tree8f98670b9d8bbd8d3c61926e2613d542abf7ff7d /libvo
parent3c991851c4645f4d2a1ababfd4aa98c26690aab5 (diff)
downloadmpv-80c237677f72bbe6e25203161406faed4f91409f.tar.bz2
mpv-80c237677f72bbe6e25203161406faed4f91409f.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/fastmemcpy.h17
1 files 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 <stddef.h>
+#include <inttypes.h>
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<height; i++)
{
mem2agpcpy(dst, src, bytesPerLine);
- src+= srcStride;
- dst+= dstStride;
+ src = (uint8_t*)src + srcStride;
+ dst = (uint8_t*)dst + dstStride;
}
}
@@ -56,8 +57,8 @@ static inline void * memcpy_pic(void * dst, const void * src, int bytesPerLine,
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;
}
@@ -68,8 +69,8 @@ static inline void * memcpy_pic(void * dst, const void * src, int bytesPerLine,
for(i=0; i<height; i++)
{
memcpy(dst, src, bytesPerLine);
- src+= srcStride;
- dst+= dstStride;
+ src = (uint8_t*)src + srcStride;
+ dst = (uint8_t*)dst + dstStride;
}
}