]> git.pld-linux.org Git - packages/DFBSee.git/blob - DFBSee-gcc4.patch
- gcc4 fix.
[packages/DFBSee.git] / DFBSee-gcc4.patch
1 --- DFBSee-0.7.4/src/rotate.c.orig      2002-08-26 21:14:14.000000000 +0200
2 +++ DFBSee-0.7.4/src/rotate.c   2008-09-12 09:38:47.000000000 +0200
3 @@ -43,9 +43,9 @@
4          {\
5            *d = *s;\
6            s++;\
7 -          (__u8*)d += dest_pitch;\
8 +          d = (type)((__u8*)d + dest_pitch);\
9          }\
10 -      (__u8*)src += src_pitch;\
11 +      src += src_pitch;\
12      }\
13  }\
14  
15 @@ -53,7 +53,7 @@
16  {\
17    type d;\
18    type s;\
19 -  (__u8 *) dest += (height - 1) * dest_pitch;\
20 +  dest += (height - 1) * dest_pitch;\
21    for (w = 0; w < width; w++)\
22      {\
23        h = height;\
24 @@ -63,9 +63,9 @@
25          {\
26            *d = *s;\
27            s++;\
28 -          (__u8*)d -= dest_pitch;\
29 +          d = (type)((__u8*)d - dest_pitch);\
30          }\
31 -      (__u8*)src += src_pitch;\
32 +      src += src_pitch;\
33      }\
34  }\
35  
36 @@ -73,7 +73,7 @@
37  {\
38    type d;\
39    type s;\
40 -  (__u8 *) dest += (height - 1) * dest_pitch;\
41 +  dest += (height - 1) * dest_pitch;\
42    while (--height)\
43      {\
44        d = (type) dest + width - 1;\
45 @@ -85,8 +85,8 @@
46            s++;\
47            d--;\
48          }\
49 -      (__u8*)src += src_pitch;\
50 -      (__u8*)dest -= dest_pitch;\
51 +      src += src_pitch;\
52 +      dest -= dest_pitch;\
53      }\
54  }\
55  
56 @@ -161,18 +161,18 @@
57               int               y)
58  {
59    DFBSurfacePixelFormat pixelformat;
60 -  void *src;
61 -  void *dest;
62 +  __u8 *src;
63 +  __u8 *dest;
64    int src_pitch, dest_pitch;
65    int width, height;
66  
67    source->GetSize (source, &width, &height);
68    source->GetPixelFormat (source, &pixelformat);
69    
70 -  source->Lock (source, DSLF_READ, &src, &src_pitch);
71 -  destination->Lock (destination, DSLF_READ, &dest, &dest_pitch);
72 +  source->Lock (source, DSLF_READ, (void**)&src, &src_pitch);
73 +  destination->Lock (destination, DSLF_READ, (void**)&dest, &dest_pitch);
74  
75 -  (__u8 *) dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
76 +  dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
77  
78    rotate (dest, dest_pitch,
79            src, src_pitch, width, height, DFB_BYTES_PER_PIXEL (pixelformat),
80 @@ -188,8 +188,8 @@
81  {
82    IDirectFBSurface      *destination;
83    DFBSurfaceDescription  dsc;
84 -  void *src;
85 -  void *dest;
86 +  __u8 *src;
87 +  __u8 *dest;
88    int src_pitch, dest_pitch;
89    int width, height;
90  
91 @@ -232,8 +232,8 @@
92        return source;
93      }
94  
95 -  source->Lock (source, DSLF_READ, &src, &src_pitch);
96 -  destination->Lock (destination, DSLF_READ, &dest, &dest_pitch);
97 +  source->Lock (source, DSLF_READ, (void**)&src, &src_pitch);
98 +  destination->Lock (destination, DSLF_READ, (void**)&dest, &dest_pitch);
99  
100    rotate (dest, dest_pitch, 
101            src, src_pitch, width, height, DFB_BYTES_PER_PIXEL (dsc.pixelformat),
This page took 0.035577 seconds and 3 git commands to generate.