]> git.pld-linux.org Git - packages/xine-lib.git/blame - xine-lib-gcc4.patch
- gcc4 fixes, nfy
[packages/xine-lib.git] / xine-lib-gcc4.patch
CommitLineData
64d34e4b
1diff -uNr xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/common.h xine-lib-1.0.1/src/libffmpeg/libavcodec/common.h
2--- xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/common.h 2005-04-26 10:09:09.000000000 +0200
3+++ xine-lib-1.0.1/src/libffmpeg/libavcodec/common.h 2005-06-17 15:47:51.000000000 +0200
4@@ -66,14 +66,6 @@
5 #define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
6 #define AVOPTION_END() AVOPTION_SUB(NULL)
7
8-struct AVOption;
9-#ifdef HAVE_MMX
10-extern const struct AVOption avoptions_common[3 + 5];
11-#else
12-extern const struct AVOption avoptions_common[3];
13-#endif
14-extern const struct AVOption avoptions_workaround_bug[11];
15-
16 #endif /* HAVE_AV_CONFIG_H */
17
18 /* Suppress restrict if it was not defined in config.h. */
19diff -uNr xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/dsputil.h xine-lib-1.0.1/src/libffmpeg/libavcodec/dsputil.h
20--- xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/dsputil.h 2005-04-26 10:09:09.000000000 +0200
21+++ xine-lib-1.0.1/src/libffmpeg/libavcodec/dsputil.h 2005-06-17 15:48:39.000000000 +0200
22@@ -554,24 +554,4 @@
23 return score;\
24 }
25
26-#ifndef HAVE_LRINTF
27-/* XXX: add ISOC specific test to avoid specific BSD testing. */
28-/* better than nothing implementation. */
29-/* btw, rintf() is existing on fbsd too -- alex */
30-static inline long int lrintf(float x)
31-{
32-#ifdef CONFIG_WIN32
33- /* XXX: incorrect, but make it compile */
34- return (int)(x);
35-#else
36- return (int)(rint(x));
37-#endif
38-}
39-#else
40-#ifndef _ISOC9X_SOURCE
41-#define _ISOC9X_SOURCE
42-#endif
43-#include <math.h>
44-#endif
45-
46 #endif
47diff -uNr xine-lib-1.0.1.orig/src/libw32dll/w32codec.c xine-lib-1.0.1/src/libw32dll/w32codec.c
48--- xine-lib-1.0.1.orig/src/libw32dll/w32codec.c 2005-04-26 10:09:15.000000000 +0200
49+++ xine-lib-1.0.1/src/libw32dll/w32codec.c 2005-06-17 15:45:22.000000000 +0200
50@@ -131,7 +131,6 @@
51 */
52 static pthread_mutex_t win32_codec_mutex;
53 static pthread_once_t once_control = PTHREAD_ONCE_INIT;
54-static char* win32_codec_name;
55
56 #define VIDEOBUFSIZE 128*1024
57
58diff -uNr xine-lib-1.0.1.orig/src/libw32dll/wine/ext.c xine-lib-1.0.1/src/libw32dll/wine/ext.c
59--- xine-lib-1.0.1.orig/src/libw32dll/wine/ext.c 2005-04-26 10:09:14.000000000 +0200
60+++ xine-lib-1.0.1/src/libw32dll/wine/ext.c 2005-06-17 15:45:22.000000000 +0200
61@@ -469,7 +469,7 @@
62
63 if (type&MEM_RESERVE && (unsigned)address&0xffff) {
64 size += (unsigned)address&0xffff;
65- (unsigned)address &= ~0xffff;
66+ address = (unsigned)address & ~0xffff;
67 }
68 pgsz = sysconf(_SC_PAGESIZE);
69 if (type&MEM_COMMIT && (unsigned)address%pgsz) {
70diff -uNr xine-lib-1.0.1.orig/src/libw32dll/wine/win32.c xine-lib-1.0.1/src/libw32dll/wine/win32.c
71--- xine-lib-1.0.1.orig/src/libw32dll/wine/win32.c 2005-04-26 10:09:14.000000000 +0200
72+++ xine-lib-1.0.1/src/libw32dll/wine/win32.c 2005-06-17 15:45:22.000000000 +0200
73@@ -2623,7 +2623,7 @@
74 dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n",
75 win, pid_data, tid);
76 if (pid_data)
77- (int)*pid_data = tid;
78+ *pid_data = tid;
79 return tid;
80 }
81
82diff -uNr xine-lib-1.0.1.orig/src/libxineadec/nosefart/nes_apu.c xine-lib-1.0.1/src/libxineadec/nosefart/nes_apu.c
83--- xine-lib-1.0.1.orig/src/libxineadec/nosefart/nes_apu.c 2005-04-26 10:09:16.000000000 +0200
84+++ xine-lib-1.0.1/src/libxineadec/nosefart/nes_apu.c 2005-06-17 15:45:22.000000000 +0200
85@@ -1012,9 +1012,10 @@
86
87 /* signed 16-bit output, unsigned 8-bit */
88 if (16 == apu->sample_bits)
89- *((int16 *) buffer)++ = (int16) accum;
90+ *(int16 *) buffer = (int16) accum;
91 else
92- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
93+ *(uint8 *) buffer = (accum >> 8) ^ 0x80;
94+ buffer++;
95 }
96
97 /* resync cycle counter */
98diff -uNr xine-lib-1.0.1.orig/src/post/audio/stretch.c xine-lib-1.0.1/src/post/audio/stretch.c
99--- xine-lib-1.0.1.orig/src/post/audio/stretch.c 2005-04-26 10:09:10.000000000 +0200
100+++ xine-lib-1.0.1/src/post/audio/stretch.c 2005-06-17 15:45:22.000000000 +0200
101@@ -476,7 +476,7 @@
102 memcpy( outbuf->mem, data_out,
103 outbuf->num_frames * this->bytes_per_frame );
104 num_frames_out -= outbuf->num_frames;
105- (uint8_t *)data_out += outbuf->num_frames * this->bytes_per_frame;
106+ data_out = (uint8_t *)data_out + outbuf->num_frames * this->bytes_per_frame;
107
108 outbuf->vpts = this->pts;
109 this->pts = 0;
110@@ -587,7 +587,7 @@
111 memcpy( (uint8_t *)this->audiofrag + this->num_frames * this->bytes_per_frame,
112 data_in, frames_to_copy * this->bytes_per_frame );
113
114- (uint8_t *)data_in += frames_to_copy * this->bytes_per_frame;
115+ data_in = (uint8_t *)data_in + frames_to_copy * this->bytes_per_frame;
116 this->num_frames += frames_to_copy;
117 buf->num_frames -= frames_to_copy;
118
119diff -uNr xine-lib-1.0.1.orig/src/video_out/vidix/drivers/pm3_vid.c xine-lib-1.0.1/src/video_out/vidix/drivers/pm3_vid.c
120--- xine-lib-1.0.1.orig/src/video_out/vidix/drivers/pm3_vid.c 2005-04-26 10:09:11.000000000 +0200
121+++ xine-lib-1.0.1/src/video_out/vidix/drivers/pm3_vid.c 2005-06-17 15:45:22.000000000 +0200
122@@ -49,7 +49,6 @@
123
124 static pciinfo_t pci_info;
125
126-static void *pm3_reg_base;
127 static void *pm3_mem;
128
129 static int pm3_vidmem = PM3_VIDMEM;
130diff -uNr xine-lib-1.0.1.orig/src/xine-engine/post.c xine-lib-1.0.1/src/xine-engine/post.c
131--- xine-lib-1.0.1.orig/src/xine-engine/post.c 2005-04-26 10:09:12.000000000 +0200
132+++ xine-lib-1.0.1/src/xine-engine/post.c 2005-06-17 15:45:22.000000000 +0200
133@@ -241,7 +241,7 @@
134 if (!*input) return port;
135 (*input)->xine_in.name = "video in";
136 (*input)->xine_in.type = XINE_POST_DATA_VIDEO;
137- (xine_video_port_t *)(*input)->xine_in.data = &port->new_port;
138+ (*input)->xine_in.data = &port->new_port;
139 (*input)->post = post;
140 xine_list_append_content(post->input, *input);
141 }
142@@ -251,7 +251,7 @@
143 if (!*output) return port;
144 (*output)->xine_out.name = "video out";
145 (*output)->xine_out.type = XINE_POST_DATA_VIDEO;
146- (xine_video_port_t **)(*output)->xine_out.data = &port->original_port;
147+ (*output)->xine_out.data = &port->original_port;
148 (*output)->xine_out.rewire = post_video_rewire;
149 (*output)->post = post;
150 (*output)->user_data = port;
151@@ -718,7 +718,7 @@
152 if (!*input) return port;
153 (*input)->xine_in.name = "audio in";
154 (*input)->xine_in.type = XINE_POST_DATA_AUDIO;
155- (xine_audio_port_t *)(*input)->xine_in.data = &port->new_port;
156+ (*input)->xine_in.data = &port->new_port;
157 (*input)->post = post;
158 xine_list_append_content(post->input, *input);
159 }
160@@ -728,7 +728,7 @@
161 if (!*output) return port;
162 (*output)->xine_out.name = "audio out";
163 (*output)->xine_out.type = XINE_POST_DATA_AUDIO;
164- (xine_audio_port_t **)(*output)->xine_out.data = &port->original_port;
165+ (*output)->xine_out.data = &port->original_port;
166 (*output)->xine_out.rewire = post_audio_rewire;
167 (*output)->post = post;
168 (*output)->user_data = port;
169diff -uNr xine-lib-1.0.1.orig/src/xine-utils/color.c xine-lib-1.0.1/src/xine-utils/color.c
170--- xine-lib-1.0.1.orig/src/xine-utils/color.c 2005-04-26 10:09:15.000000000 +0200
171+++ xine-lib-1.0.1/src/xine-utils/color.c 2005-06-17 15:45:22.000000000 +0200
172@@ -495,8 +495,10 @@
173
174 /* process blocks of 4 pixels */
175 for (x=0; x < (width / 4); x++) {
176- n1 = *(((unsigned int *) src1)++);
177- n2 = *(((unsigned int *) src2)++);
178+ n1 = *((unsigned int *) src1);
179+ src1++;
180+ n2 = *((unsigned int *) src2);
181+ src2++;
182 n3 = (n1 & 0xFF00FF00) >> 8;
183 n4 = (n2 & 0xFF00FF00) >> 8;
184 n1 &= 0x00FF00FF;
185diff -uNr xine-lib-1.0.1.orig/src/xine-utils/memcpy.c xine-lib-1.0.1/src/xine-utils/memcpy.c
186--- xine-lib-1.0.1.orig/src/xine-utils/memcpy.c 2005-04-26 10:09:15.000000000 +0200
187+++ xine-lib-1.0.1/src/xine-utils/memcpy.c 2005-06-17 15:45:22.000000000 +0200
188@@ -218,8 +218,8 @@
189 "movntps %%xmm2, 32(%1)\n"
190 "movntps %%xmm3, 48(%1)\n"
191 :: "r" (from), "r" (to) : "memory");
192- ((const unsigned char *)from)+=64;
193- ((unsigned char *)to)+=64;
194+ from = ((const unsigned char *)from) + 64;
195+ to = ((unsigned char *)to) + 64;
196 }
197 else
198 /*
199@@ -241,8 +241,8 @@
200 "movntps %%xmm2, 32(%1)\n"
201 "movntps %%xmm3, 48(%1)\n"
202 :: "r" (from), "r" (to) : "memory");
203- ((const unsigned char *)from)+=64;
204- ((unsigned char *)to)+=64;
205+ from = ((const unsigned char *)from) + 64;
206+ to = ((unsigned char *)to) + 64;
207 }
208 /* since movntq is weakly-ordered, a "sfence"
209 * is needed to become ordered again. */
210@@ -296,8 +296,8 @@
211 "movq %%mm6, 48(%1)\n"
212 "movq %%mm7, 56(%1)\n"
213 :: "r" (from), "r" (to) : "memory");
214- ((const unsigned char *)from)+=64;
215- ((unsigned char *)to)+=64;
216+ from = ((const unsigned char *)from) + 64;
217+ to = ((unsigned char *)to) + 64;
218 }
219 __asm__ __volatile__ ("emms":::"memory");
220 }
221@@ -363,8 +363,8 @@
222 "movntq %%mm6, 48(%1)\n"
223 "movntq %%mm7, 56(%1)\n"
224 :: "r" (from), "r" (to) : "memory");
225- ((const unsigned char *)from)+=64;
226- ((unsigned char *)to)+=64;
227+ from = ((const unsigned char *)from) + 64;
228+ to = ((unsigned char *)to) + 64;
229 }
230 /* since movntq is weakly-ordered, a "sfence"
231 * is needed to become ordered again. */
This page took 0.071086 seconds and 4 git commands to generate.