]> git.pld-linux.org Git - packages/DFBSee.git/commitdiff
- fix bad lvalue casting.
authorPaweł Sikora <pluto@pld-linux.org>
Fri, 12 Sep 2008 07:45:23 +0000 (07:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    DFBSee-gcc4.patch -> 1.1

DFBSee-gcc4.patch [new file with mode: 0644]

diff --git a/DFBSee-gcc4.patch b/DFBSee-gcc4.patch
new file mode 100644 (file)
index 0000000..ab714d2
--- /dev/null
@@ -0,0 +1,101 @@
+--- DFBSee-0.7.4/src/rotate.c.orig     2002-08-26 21:14:14.000000000 +0200
++++ DFBSee-0.7.4/src/rotate.c  2008-09-12 09:38:47.000000000 +0200
+@@ -43,9 +43,9 @@
+         {\
+           *d = *s;\
+           s++;\
+-          (__u8*)d += dest_pitch;\
++          d = (type)((__u8*)d + dest_pitch);\
+         }\
+-      (__u8*)src += src_pitch;\
++      src += src_pitch;\
+     }\
+ }\
+@@ -53,7 +53,7 @@
+ {\
+   type d;\
+   type s;\
+-  (__u8 *) dest += (height - 1) * dest_pitch;\
++  dest += (height - 1) * dest_pitch;\
+   for (w = 0; w < width; w++)\
+     {\
+       h = height;\
+@@ -63,9 +63,9 @@
+         {\
+           *d = *s;\
+           s++;\
+-          (__u8*)d -= dest_pitch;\
++          d = (type)((__u8*)d - dest_pitch);\
+         }\
+-      (__u8*)src += src_pitch;\
++      src += src_pitch;\
+     }\
+ }\
+@@ -73,7 +73,7 @@
+ {\
+   type d;\
+   type s;\
+-  (__u8 *) dest += (height - 1) * dest_pitch;\
++  dest += (height - 1) * dest_pitch;\
+   while (--height)\
+     {\
+       d = (type) dest + width - 1;\
+@@ -85,8 +85,8 @@
+           s++;\
+           d--;\
+         }\
+-      (__u8*)src += src_pitch;\
+-      (__u8*)dest -= dest_pitch;\
++      src += src_pitch;\
++      dest -= dest_pitch;\
+     }\
+ }\
+@@ -161,18 +161,18 @@
+              int               y)
+ {
+   DFBSurfacePixelFormat pixelformat;
+-  void *src;
+-  void *dest;
++  __u8 *src;
++  __u8 *dest;
+   int src_pitch, dest_pitch;
+   int width, height;
+   source->GetSize (source, &width, &height);
+   source->GetPixelFormat (source, &pixelformat);
+   
+-  source->Lock (source, DSLF_READ, &src, &src_pitch);
+-  destination->Lock (destination, DSLF_READ, &dest, &dest_pitch);
++  source->Lock (source, DSLF_READ, (void**)&src, &src_pitch);
++  destination->Lock (destination, DSLF_READ, (void**)&dest, &dest_pitch);
+-  (__u8 *) dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
++  dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
+   rotate (dest, dest_pitch,
+           src, src_pitch, width, height, DFB_BYTES_PER_PIXEL (pixelformat),
+@@ -188,8 +188,8 @@
+ {
+   IDirectFBSurface      *destination;
+   DFBSurfaceDescription  dsc;
+-  void *src;
+-  void *dest;
++  __u8 *src;
++  __u8 *dest;
+   int src_pitch, dest_pitch;
+   int width, height;
+@@ -232,8 +232,8 @@
+       return source;
+     }
+-  source->Lock (source, DSLF_READ, &src, &src_pitch);
+-  destination->Lock (destination, DSLF_READ, &dest, &dest_pitch);
++  source->Lock (source, DSLF_READ, (void**)&src, &src_pitch);
++  destination->Lock (destination, DSLF_READ, (void**)&dest, &dest_pitch);
+   rotate (dest, dest_pitch, 
+           src, src_pitch, width, height, DFB_BYTES_PER_PIXEL (dsc.pixelformat),
This page took 0.51156 seconds and 4 git commands to generate.