diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2005-05-07 09:11:37 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2005-05-07 09:11:37 +0000 |
commit | f2f91f2d7d1de1f0d9f4249d90e4edfd01ed0bb4 (patch) | |
tree | f77e37e2963b45a14ed2447b62f7817e80a32d34 /src | |
parent | eed0d8c57fb0c0a7917a820dfc009baf81f223c0 (diff) | |
download | xine-lib-f2f91f2d7d1de1f0d9f4249d90e4edfd01ed0bb4.tar.gz xine-lib-f2f91f2d7d1de1f0d9f4249d90e4edfd01ed0bb4.tar.bz2 |
*BUGFIX*
gcc4 patches from Dams Nadé (livna.org) and Keenan Pepper.
CVS patchset: 7527
CVS date: 2005/05/07 09:11:37
Diffstat (limited to 'src')
-rw-r--r-- | src/libw32dll/w32codec.c | 3 | ||||
-rw-r--r-- | src/libw32dll/wine/ext.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.c | 2 | ||||
-rw-r--r-- | src/libxineadec/nosefart/diff_to_nosefart_cvs.patch | 31 | ||||
-rw-r--r-- | src/libxineadec/nosefart/nes_apu.c | 17 | ||||
-rw-r--r-- | src/post/audio/stretch.c | 6 | ||||
-rw-r--r-- | src/xine-engine/post.c | 10 | ||||
-rw-r--r-- | src/xine-utils/color.c | 6 | ||||
-rw-r--r-- | src/xine-utils/memcpy.c | 16 |
9 files changed, 64 insertions, 29 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index ab7719da5..ba091e70f 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: w32codec.c,v 1.146 2005/04/23 02:02:28 tmmm Exp $ + * $Id: w32codec.c,v 1.147 2005/05/07 09:11:38 valtri Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -131,7 +131,6 @@ static GUID wmav_clsid = */ static pthread_mutex_t win32_codec_mutex; static pthread_once_t once_control = PTHREAD_ONCE_INIT; -static char* win32_codec_name; #define VIDEOBUFSIZE 128*1024 diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c index 49e7d0719..da1ac7149 100644 --- a/src/libw32dll/wine/ext.c +++ b/src/libw32dll/wine/ext.c @@ -469,7 +469,7 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec if (type&MEM_RESERVE && (unsigned)address&0xffff) { size += (unsigned)address&0xffff; - (unsigned)address &= ~0xffff; + address = (unsigned)address & ~0xffff; } pgsz = sysconf(_SC_PAGESIZE); if (type&MEM_COMMIT && (unsigned)address%pgsz) { diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index f7571e2cc..dcab43ea5 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -2623,7 +2623,7 @@ static int WINAPI expGetWindowThreadProcessId(HWND win, int *pid_data) dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n", win, pid_data, tid); if (pid_data) - (int)*pid_data = tid; + *pid_data = tid; return tid; } diff --git a/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch index 9ae52bbce..280cd89cb 100644 --- a/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch +++ b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch @@ -2,7 +2,7 @@ diff -u -p -r1.1.1.1 types.h --- types.h 26 Jul 2004 15:27:59 -0000 1.1.1.1 +++ types.h 26 Aug 2004 16:00:07 -0000 @@ -23,8 +23,8 @@ - ** $Id: diff_to_nosefart_cvs.patch,v 1.1 2004/08/27 19:33:37 valtri Exp $ + ** $Id: diff_to_nosefart_cvs.patch,v 1.2 2005/05/07 09:11:39 valtri Exp $ */ -#ifndef _TYPES_H_ @@ -21,6 +21,10 @@ diff -u -p -r1.1.1.1 types.h /* ** $Log: diff_to_nosefart_cvs.patch,v $ + ** Revision 1.2 2005/05/07 09:11:39 valtri + ** *BUGFIX* + ** gcc4 patches from Dams Nadé (livna.org) and Keenan Pepper. + ** ** Revision 1.1 2004/08/27 19:33:37 valtri ** MINGW32 port. Engine library and most of plugins compiles now. ** @@ -44,3 +48,28 @@ diff -u -p -r1.1.1.1 types.h ** - move original build files from included phread and zlib into archives ** and replace them by autotools ** +Index: nes_apu.c +=================================================================== +RCS file: /home/valtri/CVS/xine-lib/src/libxineadec/nosefart/nes_apu.c,v +retrieving revision 1.1.1.1 +diff -u -p -r1.1.1.1 nes_apu.c +--- nes_apu.c 12 Dec 2004 13:57:16 -0000 1.1.1.1 ++++ nes_apu.c 7 May 2005 08:23:36 -0000 +@@ -1011,10 +1011,13 @@ void apu_process(void *buffer, int num_s + accum = -0x8000; + + /* signed 16-bit output, unsigned 8-bit */ +- if (16 == apu->sample_bits) +- *((int16 *) buffer)++ = (int16) accum; +- else +- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80; ++ if (16 == apu->sample_bits) { ++ *((int16 *) buffer) = (int16) accum; ++ buffer = (int16 *) buffer + 1; ++ } else { ++ *((uint8 *) buffer) = (accum >> 8) ^ 0x80; ++ buffer = (int8 *) buffer + 1; ++ } + } + + /* resync cycle counter */ diff --git a/src/libxineadec/nosefart/nes_apu.c b/src/libxineadec/nosefart/nes_apu.c index 525d103b1..4a2ed8f4d 100644 --- a/src/libxineadec/nosefart/nes_apu.c +++ b/src/libxineadec/nosefart/nes_apu.c @@ -20,7 +20,7 @@ ** nes_apu.c ** ** NES APU emulation -** $Id: nes_apu.c,v 1.3 2004/12/12 06:55:59 athp Exp $ +** $Id: nes_apu.c,v 1.4 2005/05/07 09:11:39 valtri Exp $ */ #include <string.h> @@ -1011,10 +1011,13 @@ void apu_process(void *buffer, int num_samples) accum = -0x8000; /* signed 16-bit output, unsigned 8-bit */ - if (16 == apu->sample_bits) - *((int16 *) buffer)++ = (int16) accum; - else - *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80; + if (16 == apu->sample_bits) { + *((int16 *) buffer) = (int16) accum; + buffer = (int16 *) buffer + 1; + } else { + *((uint8 *) buffer) = (accum >> 8) ^ 0x80; + buffer = (int8 *) buffer + 1; + } } /* resync cycle counter */ @@ -1154,6 +1157,10 @@ int32 apu_getcyclerate(void) /* ** $Log: nes_apu.c,v $ +** Revision 1.4 2005/05/07 09:11:39 valtri +** *BUGFIX* +** gcc4 patches from Dams Nadé (livna.org) and Keenan Pepper. +** ** Revision 1.3 2004/12/12 06:55:59 athp ** Code cleanups and elimination of some compiler warnings; patch courtesy of AL13N ** diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 4598b1153..1f8eb3797 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -19,7 +19,7 @@ * * Time stretch by a given factor, optionally preserving pitch * - * $Id: stretch.c,v 1.5 2004/10/29 23:11:38 miguelfreitas Exp $ + * $Id: stretch.c,v 1.6 2005/05/07 09:11:39 valtri Exp $ * */ @@ -476,7 +476,7 @@ static void stretch_process_fragment( post_audio_port_t *port, memcpy( outbuf->mem, data_out, outbuf->num_frames * this->bytes_per_frame ); num_frames_out -= outbuf->num_frames; - (uint8_t *)data_out += outbuf->num_frames * this->bytes_per_frame; + data_out = (uint8_t *)data_out + outbuf->num_frames * this->bytes_per_frame; outbuf->vpts = this->pts; this->pts = 0; @@ -587,7 +587,7 @@ static void stretch_port_put_buffer (xine_audio_port_t *port_gen, memcpy( (uint8_t *)this->audiofrag + this->num_frames * this->bytes_per_frame, data_in, frames_to_copy * this->bytes_per_frame ); - (uint8_t *)data_in += frames_to_copy * this->bytes_per_frame; + data_in = (uint8_t *)data_in + frames_to_copy * this->bytes_per_frame; this->num_frames += frames_to_copy; buf->num_frames -= frames_to_copy; diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 40d65d215..4b2da8afc 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.c,v 1.28 2004/10/17 19:14:30 mroi Exp $ + * $Id: post.c,v 1.29 2005/05/07 09:11:39 valtri Exp $ */ /* @@ -241,7 +241,7 @@ post_video_port_t *_x_post_intercept_video_port(post_plugin_t *post, xine_video_ if (!*input) return port; (*input)->xine_in.name = "video in"; (*input)->xine_in.type = XINE_POST_DATA_VIDEO; - (xine_video_port_t *)(*input)->xine_in.data = &port->new_port; + (*input)->xine_in.data = &port->new_port; (*input)->post = post; xine_list_append_content(post->input, *input); } @@ -251,7 +251,7 @@ post_video_port_t *_x_post_intercept_video_port(post_plugin_t *post, xine_video_ if (!*output) return port; (*output)->xine_out.name = "video out"; (*output)->xine_out.type = XINE_POST_DATA_VIDEO; - (xine_video_port_t **)(*output)->xine_out.data = &port->original_port; + (*output)->xine_out.data = &port->original_port; (*output)->xine_out.rewire = post_video_rewire; (*output)->post = post; (*output)->user_data = port; @@ -718,7 +718,7 @@ post_audio_port_t *_x_post_intercept_audio_port(post_plugin_t *post, xine_audio_ if (!*input) return port; (*input)->xine_in.name = "audio in"; (*input)->xine_in.type = XINE_POST_DATA_AUDIO; - (xine_audio_port_t *)(*input)->xine_in.data = &port->new_port; + (*input)->xine_in.data = &port->new_port; (*input)->post = post; xine_list_append_content(post->input, *input); } @@ -728,7 +728,7 @@ post_audio_port_t *_x_post_intercept_audio_port(post_plugin_t *post, xine_audio_ if (!*output) return port; (*output)->xine_out.name = "audio out"; (*output)->xine_out.type = XINE_POST_DATA_AUDIO; - (xine_audio_port_t **)(*output)->xine_out.data = &port->original_port; + (*output)->xine_out.data = &port->original_port; (*output)->xine_out.rewire = post_audio_rewire; (*output)->post = post; (*output)->user_data = port; diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c index d01e8b649..4e1e7b9ef 100644 --- a/src/xine-utils/color.c +++ b/src/xine-utils/color.c @@ -61,7 +61,7 @@ * instructions), these macros will automatically map to those special * instructions. * - * $Id: color.c,v 1.25 2005/01/23 23:01:13 jstembridge Exp $ + * $Id: color.c,v 1.26 2005/05/07 09:11:40 valtri Exp $ */ #include "xine_internal.h" @@ -495,8 +495,8 @@ static void vscale_chroma_line (unsigned char *dst, int pitch, /* process blocks of 4 pixels */ for (x=0; x < (width / 4); x++) { - n1 = *(((unsigned int *) src1)++); - n2 = *(((unsigned int *) src2)++); + n1 = *(((unsigned int *) src1)); src1 = ((unsigned int *) src1) + 1; + n2 = *(((unsigned int *) src2)); src2 = ((unsigned int *) src2) + 1; n3 = (n1 & 0xFF00FF00) >> 8; n4 = (n2 & 0xFF00FF00) >> 8; n1 &= 0x00FF00FF; diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c index ee86b3759..d448f4902 100644 --- a/src/xine-utils/memcpy.c +++ b/src/xine-utils/memcpy.c @@ -218,8 +218,8 @@ static void * sse_memcpy(void * to, const void * from, size_t len) "movntps %%xmm2, 32(%1)\n" "movntps %%xmm3, 48(%1)\n" :: "r" (from), "r" (to) : "memory"); - ((const unsigned char *)from)+=64; - ((unsigned char *)to)+=64; + from = ((const unsigned char *)from) + 64; + to = ((unsigned char *)to) + 64; } else /* @@ -241,8 +241,8 @@ static void * sse_memcpy(void * to, const void * from, size_t len) "movntps %%xmm2, 32(%1)\n" "movntps %%xmm3, 48(%1)\n" :: "r" (from), "r" (to) : "memory"); - ((const unsigned char *)from)+=64; - ((unsigned char *)to)+=64; + from = ((const unsigned char *)from) + 64; + to = ((unsigned char *)to) + 64; } /* since movntq is weakly-ordered, a "sfence" * is needed to become ordered again. */ @@ -296,8 +296,8 @@ static void * mmx_memcpy(void * to, const void * from, size_t len) "movq %%mm6, 48(%1)\n" "movq %%mm7, 56(%1)\n" :: "r" (from), "r" (to) : "memory"); - ((const unsigned char *)from)+=64; - ((unsigned char *)to)+=64; + from = ((const unsigned char *)from) + 64; + to = ((unsigned char *)to) + 64; } __asm__ __volatile__ ("emms":::"memory"); } @@ -363,8 +363,8 @@ static void * mmx2_memcpy(void * to, const void * from, size_t len) "movntq %%mm6, 48(%1)\n" "movntq %%mm7, 56(%1)\n" :: "r" (from), "r" (to) : "memory"); - ((const unsigned char *)from)+=64; - ((unsigned char *)to)+=64; + from = ((const unsigned char *)from) + 64; + to = ((unsigned char *)to) + 64; } /* since movntq is weakly-ordered, a "sfence" * is needed to become ordered again. */ |