[MPlayer-dev-eng] [PATCH] Huge batch of compiler warning fixes

Dominik Mierzejewski dominik at rangers.eu.org
Mon Nov 4 18:15:03 CET 2002


A couple of patches, actually:
First one adds -Wall to CFLAGS in places they were missing, so that we
can catch all warnings.

Next one fixes mostly trivial warnings: fixes wrong printf format strings,
comments out unused variables, adds missing declarations and #includes.
On two occasions I added missing return statements: one in libvo/aclib.c
(obvious) and the other in libvo/x11_common.c:
--- MPlayer-20021104/libvo/x11_common.c.warn    Mon Nov  4 13:36:51 2002
+++ MPlayer-20021104/libvo/x11_common.c Mon Nov  4 16:07:22 2002
@@ -1103,6 +1103,7 @@
        else if (!strcasecmp(name, "contrast")) *value = vo_contrast;
        else if (!strcasecmp(name, "gamma")) *value = vo_gamma;
        else return VO_NOTIMPL;
+       return VO_TRUE;
 }
 
 
I hope this is the right thing to return in case of 'success'.

And, last but not least - a patch for win32 dll/dshow loader, fixing warnings
caused by defining ULONG and DWORD as unsigned int, instead of unsigned long.

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
-------------- next part --------------
--- MPlayer-20021031/input/Makefile.nodebug	Thu Oct 31 03:28:19 2002
+++ MPlayer-20021031/input/Makefile	Thu Oct 31 03:28:30 2002
@@ -6,7 +6,7 @@
 SRCS=input.c joystick.c lirc.c 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(EXTRA_INC)
+CFLAGS  = $(OPTFLAGS) -Wall -I. -I.. $(EXTRA_INC)
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/liba52/Makefile.nodebug	Thu Aug 29 23:19:38 2002
+++ MPlayer-20021031/liba52/Makefile	Thu Oct 31 03:29:38 2002
@@ -6,7 +6,7 @@
 SRCS    = crc.c resample.c bit_allocate.c bitstream.c downmix.c imdct.c imdct_mlib.c parse.c
 OBJS	= $(SRCS:.c=.o)
 
-CFLAGS  = $(MLIB_INC) $(OPTFLAGS) 
+CFLAGS  = $(MLIB_INC) $(OPTFLAGS) -Wall
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/libao2/Makefile.nodebug	Tue Jun 18 19:40:13 2002
+++ MPlayer-20021031/libao2/Makefile	Thu Oct 31 03:30:02 2002
@@ -8,7 +8,7 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(ARTS_INC) $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DVB_INC)
+CFLAGS  = $(OPTFLAGS) -Wall -I. -I.. $(ARTS_INC) $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DVB_INC)
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/libdha/kernelhelper/Makefile.nodebug	Sat Aug 24 15:36:12 2002
+++ MPlayer-20021031/libdha/kernelhelper/Makefile	Thu Oct 31 03:30:59 2002
@@ -1,6 +1,6 @@
 KERNEL_INCLUDES = /usr/src/linux/include
 INCLUDES = -I$(KERNEL_INCLUDES)
-CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
+CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
 VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
 MDIR = /lib/modules/$(VERSION)/misc
 
--- MPlayer-20021031/libdha/Makefile.nodebug	Mon Oct 21 16:44:31 2002
+++ MPlayer-20021031/libdha/Makefile	Thu Oct 31 03:30:44 2002
@@ -20,7 +20,7 @@
 SRCS=libdha.c mtrr.c pci.c pci_names.c
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -fPIC -I. -I..
+CFLAGS  = $(OPTFLAGS) -fPIC -Wall -I. -I..
 LIBS = 
 ifeq ($(TARGET_OS),OpenBSD)
 ifeq ($(TARGET_ARCH_X86),yes)
--- MPlayer-20021031/libmpcodecs/Makefile.nodebug	Thu Oct 31 00:57:55 2002
+++ MPlayer-20021031/libmpcodecs/Makefile	Thu Oct 31 03:31:26 2002
@@ -28,7 +28,7 @@
 SRCS2=$(ENCODER_SRCS)
 OBJS2=$(SRCS2:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -Inative -I.. -I../libmpdemux -I../loader $(EXTRA_INC)
+CFLAGS  = $(OPTFLAGS) -Wall -I. -Inative -I.. -I../libmpdemux -I../loader $(EXTRA_INC)
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/libmpdemux/Makefile.nodebug	Thu Oct 24 00:56:30 2002
+++ MPlayer-20021031/libmpdemux/Makefile	Thu Oct 31 03:31:45 2002
@@ -20,7 +20,7 @@
 OBJS	= $(SRCS:.c=.o)
 OBJS   += $(CPLUSPLUSSRCS:.cpp=.o)
 INCLUDE = -I../loader $(CSS_INC) $(EXTRA_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE)
+CFLAGS  = $(OPTFLAGS) -Wall $(INCLUDE)
 CPLUSPLUSFLAGS  = $(CFLAGS) $(CPLUSPLUSINCLUDE)
 CPLUSPLUS = $(CC)
 
--- MPlayer-20021031/libmpeg2/Makefile.nodebug	Sun Apr  7 18:32:04 2002
+++ MPlayer-20021031/libmpeg2/Makefile	Thu Oct 31 03:32:26 2002
@@ -8,7 +8,7 @@
 		slice.c stats.c # decode.c
 OBJS	= $(SRCS:.c=.o)
 INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC) $(MLIB_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
+CFLAGS  = $(OPTFLAGS) -Wall $(INCLUDE) -DMPG12PLAY
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/libvo/Makefile.nodebug	Thu Oct 24 00:56:30 2002
+++ MPlayer-20021031/libvo/Makefile	Thu Oct 31 03:23:03 2002
@@ -10,7 +10,7 @@
 SRCS += vosub_vidix.c
 endif
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DVB_INC) $(DIRECTFB_INC) $(FREETYPE_INC) -DMPG12PLAY #-Wall
+CFLAGS  = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DVB_INC) $(DIRECTFB_INC) $(FREETYPE_INC) -DMPG12PLAY -Wall
 ifeq ($(VIDIX),yes)
 CFLAGS += -DVIDIX_PATH='"$(prefix)/lib/mplayer/vidix/"'
 endif
--- MPlayer-20021031/linux/Makefile.nodebug	Sat Aug 24 15:36:15 2002
+++ MPlayer-20021031/linux/Makefile	Thu Oct 31 03:32:50 2002
@@ -12,7 +12,7 @@
 endif
 endif
 
-CFLAGS  = $(OPTFLAGS) -I. -I..
+CFLAGS  = $(OPTFLAGS) -Wall -I. -I..
 # -I/usr/X11R6/include/
 
 .SUFFIXES: .c .o
--- MPlayer-20021031/loader/dshow/Makefile.nodebug	Thu Aug 29 23:19:39 2002
+++ MPlayer-20021031/loader/dshow/Makefile	Thu Oct 31 03:34:00 2002
@@ -10,7 +10,7 @@
 # OBJS	= DS_AudioDec.o DS_VideoDec.o DS_Filter.o allocator.o cmediasample.o guids.o inputpin.o outputpin.o
 
 INCLUDE = -I. -I.. $(EXTRA_INC) -DNOAVIFILE_HEADERS
-CFLAGS  = $(OPTFLAGS) $(INCLUDE)
+CFLAGS  = $(OPTFLAGS) -Wall $(INCLUDE)
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/loader/Makefile.nodebug	Sat Aug 24 15:36:15 2002
+++ MPlayer-20021031/loader/Makefile	Thu Oct 31 03:33:21 2002
@@ -16,7 +16,7 @@
 # -fno-omit-frame-pointer works around this gcc-3.0 bug.  gcc-2.95.2 is OK.
 # Note: -D_FILE_OFFSET_BITS=32 is required to disable using mmap64(),
 # as it's broken in glibc 2.1.2 (bad header) and 2.1.3 (bad code)
-WARN_FLAGS = 
+WARN_FLAGS = -Wall
 CFLAGS=-I. -I.. $(OPTFLAGS) -U_FILE_OFFSET_BITS $(EXTRA_INC) $(WARN_FLAGS) -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 #CFLAGS=-I. -I.. -O $(WARN_FLAGS) -g #-fno-omit-frame-pointer
 
--- MPlayer-20021031/mp3lib/Makefile.nodebug	Sun Sep  1 20:05:35 2002
+++ MPlayer-20021031/mp3lib/Makefile	Thu Oct 31 03:34:21 2002
@@ -7,7 +7,7 @@
 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
 endif
-CFLAGS  = $(OPTFLAGS) $(EXTRA_INC)
+CFLAGS  = $(OPTFLAGS) -Wall $(EXTRA_INC)
 ifeq ($(TARGET_ARCH_X86),yes)
 SRCS += decode_i586.c
 OBJS += decode_i586.o
--- MPlayer-20021031/postproc/Makefile.nodebug	Thu Oct 31 00:57:56 2002
+++ MPlayer-20021031/postproc/Makefile	Thu Oct 31 03:34:36 2002
@@ -12,7 +12,7 @@
 SPPOBJS=postprocess_pic.o
 CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
 
-CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
+CFLAGS  = $(OPTFLAGS) -Wall $(MLIB_INC) -I. -I.. $(EXTRA_INC)
 # -I/usr/X11R6/include/
 
 .SUFFIXES: .c .o
--- MPlayer-20021031/vidix/drivers/Makefile.nodebug	Fri Aug 30 00:13:55 2002
+++ MPlayer-20021031/vidix/drivers/Makefile	Thu Oct 31 03:35:26 2002
@@ -9,37 +9,37 @@
 RADEON_SRCS=radeon_vid.c
 RADEON_OBJS=radeon_vid.o
 RADEON_LIBS=-L../../libdha -ldha -lm
-RADEON_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+RADEON_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I..
 
 RAGE128_VID=rage128_vid.so
 RAGE128_SRCS=radeon_vid.c
 RAGE128_OBJS=rage128_vid.o
 RAGE128_LIBS=-L../../libdha -ldha
-RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DRAGE128
+RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I.. -DRAGE128
 
 PM3_VID=pm3_vid.so
 PM3_SRCS=pm3_vid.c
 PM3_OBJS=pm3_vid.o
 PM3_LIBS=-L../../libdha -ldha
-PM3_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. 
+PM3_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I.. 
 
 MACH64_VID=mach64_vid.so
 MACH64_SRCS=mach64_vid.c
 MACH64_OBJS=mach64_vid.o
 MACH64_LIBS=-L../../libdha -ldha
-MACH64_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+MACH64_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I..
 
 MGA_VID=mga_vid.so
 MGA_SRCS=mga_vid.c
 MGA_OBJS=mga_vid.o
 MGA_LIBS=-L../../libdha -ldha -lm
-MGA_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. 
+MGA_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I.. 
 
 MGA_CRTC2_VID=mga_crtc2_vid.so
 MGA_CRTC2_SRCS=mga_vid.c
 MGA_CRTC2_OBJS=mga_crtc2_vid.o
 MGA_CRTC2_LIBS=-L../../libdha -ldha -lm
-MGA_CRTC2_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DCRTC2
+MGA_CRTC2_CFLAGS=$(OPTFLAGS) -fPIC -Wall -I. -I.. -DCRTC2
 
 all:    $(RADEON_VID) $(RAGE128_VID) $(MACH64_VID) $(NVIDIA_VID) $(GENFB_VID) $(MGA_VID) $(MGA_CRTC2_VID) $(PM3_VID)
 
--- MPlayer-20021031/vidix/Makefile.nodebug	Sat Aug 24 15:36:15 2002
+++ MPlayer-20021031/vidix/Makefile	Thu Oct 31 03:35:38 2002
@@ -7,7 +7,7 @@
 SRCS    = vidixlib.c
 OBJS	= $(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS)
+CFLAGS  = $(OPTFLAGS) -Wall
 
 .SUFFIXES: .c .o
 
--- MPlayer-20021031/libmpdvdkit2/Makefile.nodebug	Sat Aug 17 00:43:44 2002
+++ MPlayer-20021031/libmpdvdkit2/Makefile	Thu Oct 31 03:32:02 2002
@@ -22,7 +22,7 @@
 #	 \ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
 # -funroll-loops  removed, triggered gcc 3.0.4 (3.x?) bug
-CFLAGS= -I. $(OPTFLAGS) $(EXTRA_INC)\
+CFLAGS= -I. $(OPTFLAGS) -Wall $(EXTRA_INC)\
 	-DSYS_LINUX -D__USE_UNIX98 -D_REENTRANT -D_GNU_SOURCE \
 	-ffast-math -fomit-frame-pointer 
 
--- MPlayer-20021031/Makefile.nodebug	Thu Oct 31 03:08:24 2002
+++ MPlayer-20021031/Makefile	Thu Oct 31 03:22:06 2002
@@ -42,7 +42,7 @@
 CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(XVID_LIB) $(DECORE_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) 
 COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a $(PP_LIB) postproc/libswscale.a linux/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(STREAMING_LIB) $(WIN32_LIB)
 
-CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) $(SDL_INC) # -Wall
+CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) $(SDL_INC) -Wall
 
 PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers linux postproc input libvo libaf
 ifeq ($(VIDIX),yes)
@@ -206,7 +206,7 @@
 $(MENCODER_DEP): version.h
 
 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h
-	$(CC) $(CFLAGS) -g codec-cfg.c mp_msg.c -o $(PRG_CFG) -DCODECS2HTML
+	$(CC) $(CFLAGS) codec-cfg.c mp_msg.c -o $(PRG_CFG) -DCODECS2HTML
 
 install: $(ALL_PRG)
 ifeq ($(VIDIX),yes)
-------------- next part --------------
--- MPlayer-20021104/liba52/resample_mmx.c.warn	Sat Jan 19 06:12:34 2002
+++ MPlayer-20021104/liba52/resample_mmx.c	Mon Nov  4 16:07:22 2002
@@ -13,7 +13,7 @@
 static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
 
 static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-512, %%esi		\n\t"
@@ -51,7 +51,7 @@
 }
 
 static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 /* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
 #ifdef HAVE_SSE
@@ -100,7 +100,7 @@
 }
 
 static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -156,7 +156,7 @@
 }
 
 static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -208,7 +208,7 @@
 }
 
 static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -268,7 +268,7 @@
 }
 
 static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -309,7 +309,7 @@
 }
 
 static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -348,7 +348,7 @@
 }
 
 static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -389,7 +389,7 @@
 }
 
 static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
@@ -436,7 +436,7 @@
 }
 
 static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
-    int i;
+/*    int i;*/
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
--- MPlayer-20021104/libao2/pl_surround.c.warn	Fri May 31 20:16:45 2002
+++ MPlayer-20021104/libao2/pl_surround.c	Mon Nov  4 16:07:22 2002
@@ -173,7 +173,7 @@
 };
 
 // Experimental moving average dominances
-static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0;
+/*static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0;*/
 
 // processes 'ao_plugin_data.len' bytes of 'data'
 // called for every block of data
--- MPlayer-20021104/libao2/pl_resample.c.warn	Sun Sep 22 18:39:21 2002
+++ MPlayer-20021104/libao2/pl_resample.c	Mon Nov  4 16:07:22 2002
@@ -160,6 +160,10 @@
 static void reset(){
 }
 
+/* forward declarations */
+int upsample();
+int downsample();
+
 // processes 'ao_plugin_data.len' bytes of 'data'
 // called for every block of data
 // FIXME: this routine needs to be optimized (it is probably possible to do a lot here)
--- MPlayer-20021104/libao2/pl_eq.c.warn	Wed Oct  2 00:22:36 2002
+++ MPlayer-20021104/libao2/pl_eq.c	Mon Nov  4 16:07:22 2002
@@ -118,7 +118,7 @@
 // open & setup audio device
 // return: 1=success 0=fail
 static int init(){
-  int   c,k   = 0;
+  int   /*c,*/k   = 0;
   float F[KM] = CF;
   
   // Check input format
--- MPlayer-20021104/libao2/ao_arts.c.warn	Sun Aug  4 01:44:08 2002
+++ MPlayer-20021104/libao2/ao_arts.c	Mon Nov  4 16:07:22 2002
@@ -44,7 +44,7 @@
 	int err;
 	int frag_spec;
 
-	if(err=arts_init()) {
+	if( (err=arts_init()) ) {
 		mp_msg(MSGT_AO, MSGL_ERR, "AO: [arts] %s\n", arts_error_text(err));
 		return 0;
 	}
--- MPlayer-20021104/libmpcodecs/native/qtrpza.c.warn	Mon Feb 11 00:51:23 2002
+++ MPlayer-20021104/libmpcodecs/native/qtrpza.c	Mon Nov  4 16:07:22 2002
@@ -130,7 +130,7 @@
 										int height, int bytes_per_pixel)
 {
 
-	int i;
+/*	int i;*/
 	int stream_ptr = 0;
 	int chunk_size;
 	unsigned char opcode;
@@ -145,7 +145,7 @@
 	int pixel_ptr = 0;
 	int pixel_x, pixel_y;
 	int row_inc = bytes_per_pixel * (width - 4);
-	int max_height = row_inc * height;
+/*	int max_height = row_inc * height;*/
 	int block_x_inc = bytes_per_pixel * 4;
 	int block_y_inc = bytes_per_pixel * width;
 	int block_ptr;
--- MPlayer-20021104/libmpcodecs/dec_audio.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/dec_audio.c	Mon Nov  4 16:07:22 2002
@@ -45,7 +45,7 @@
 
 int init_audio_codec(sh_audio_t *sh_audio)
 {
-  unsigned i;
+/*  unsigned i;*/
 
   // reset in/out buffer size/pointer:
   sh_audio->a_buffer_size=0;
@@ -166,6 +166,8 @@
     return 0;
 }
 
+extern char *get_path(char *filename);
+
 int init_best_audio_codec(sh_audio_t *sh_audio,char** audio_codec_list,char** audio_fm_list){
 char* ac_l_default[2]={"",(char*)NULL};
 // hack:
--- MPlayer-20021104/libmpcodecs/ad_acm.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/ad_acm.c	Mon Nov  4 16:07:22 2002
@@ -39,11 +39,13 @@
   return 1;
 }
 
+extern void print_wave_header(WAVEFORMATEX *h);
+
 static int preinit(sh_audio_t *sh_audio)
 {
     HRESULT ret;
     WAVEFORMATEX *in_fmt = sh_audio->wf;
-    unsigned int srcsize = 0;
+    DWORD srcsize = 0;
     acm_context_t *priv;
     
     priv = malloc(sizeof(acm_context_t));
--- MPlayer-20021104/libmpcodecs/ad_qtaudio.c.warn	Fri Nov  1 00:11:34 2002
+++ MPlayer-20021104/libmpcodecs/ad_qtaudio.c	Mon Nov  4 16:07:22 2002
@@ -192,11 +192,11 @@
     WantedBufferSize=OutputFormatInfo.numChannels*OutputFormatInfo.sampleRate*2;
     error = SoundConverterGetBufferSizes(myConverter,
 	WantedBufferSize,&FramesToGet,&InputBufferSize,&OutputBufferSize);
-    printf("SoundConverterGetBufferSizes:%i\n");
-    printf("WantedBufferSize = %i\n",WantedBufferSize);
-    printf("InputBufferSize  = %i\n",InputBufferSize);
-    printf("OutputBufferSize = %i\n",OutputBufferSize);
-    printf("FramesToGet = %i\n",FramesToGet);
+    printf("SoundConverterGetBufferSizes:%i\n",error);
+    printf("WantedBufferSize = %li\n",WantedBufferSize);
+    printf("InputBufferSize  = %li\n",InputBufferSize);
+    printf("OutputBufferSize = %li\n",OutputBufferSize);
+    printf("FramesToGet = %li\n",FramesToGet);
     
     InFrameSize=InputBufferSize/FramesToGet;
     OutFrameSize=OutputBufferSize/FramesToGet;
@@ -256,7 +256,7 @@
 
     InputBufferSize=FramesToGet*InFrameSize;
 
-    printf("FramesToGet = %i  (%i -> %i bytes)\n",FramesToGet,
+    printf("FramesToGet = %li  (%li -> %li bytes)\n",FramesToGet,
 	InputBufferSize, FramesToGet*OutFrameSize);
 
     if(InputBufferSize>sh->a_in_buffer_len){
@@ -270,8 +270,8 @@
     error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer,
 	FramesToGet,buf,&ConvertedFrames,&ConvertedBytes);
     printf("SoundConverterConvertBuffer:%i\n",error);
-    printf("ConvertedFrames = %i\n",ConvertedFrames);
-    printf("ConvertedBytes = %i\n",ConvertedBytes);
+    printf("ConvertedFrames = %li\n",ConvertedFrames);
+    printf("ConvertedBytes = %li\n",ConvertedBytes);
     
     InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!!
     sh->a_in_buffer_len-=InputBufferSize;
--- MPlayer-20021104/libmpcodecs/dec_video.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/dec_video.c	Mon Nov  4 16:07:22 2002
@@ -202,6 +202,8 @@
     return 0;
 }
 
+extern char *get_path(char *filename);
+
 int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list){
 char* vc_l_default[2]={"",(char*)NULL};
 // hack:
--- MPlayer-20021104/libmpcodecs/vd_huffyuv.c.warn	Sun Sep  1 11:45:50 2002
+++ MPlayer-20021104/libmpcodecs/vd_huffyuv.c	Mon Nov  4 16:07:22 2002
@@ -595,7 +595,7 @@
 {
 	mp_image_t* mpi;
 	int pixel_ptr;
-	unsigned char y1, y2, u, v, r, g, b, a;
+	unsigned char y1, y2, u, v, r, g, b/*, a*/;
 	unsigned char left_y, left_u, left_v, left_r, left_g, left_b;
 	unsigned char tmp, mi, mx, med;
 	unsigned char *swap;
--- MPlayer-20021104/libmpcodecs/vd_lzo.c.warn	Thu Oct 31 00:57:55 2002
+++ MPlayer-20021104/libmpcodecs/vd_lzo.c	Mon Nov  4 16:07:22 2002
@@ -98,10 +98,10 @@
 {
     static int init_done = 0;
     int r;
-    int cb = 1;
-    int cr = 2;
+/*    int cb = 1;
+    int cr = 2;*/
     mp_image_t* mpi;
-    int w, h;
+    int w/*, h*/;
     lzo_context_t *priv = sh->context;
 
     if (len <= 0) {
--- MPlayer-20021104/libmpcodecs/vd_vfw.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/vd_vfw.c	Mon Nov  4 16:07:22 2002
@@ -138,6 +138,8 @@
     return CONTROL_UNKNOWN;
 }
 
+extern void print_video_header(BITMAPINFOHEADER *h);
+
 // init driver
 static int init(sh_video_t *sh){
     HRESULT ret;
--- MPlayer-20021104/libmpcodecs/vf_pp.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/vf_pp.c	Mon Nov  4 16:07:22 2002
@@ -8,6 +8,10 @@
 #include "../mp_msg.h"
 #include "../cpudetect.h"
 
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
--- MPlayer-20021104/libmpcodecs/vf_1bpp.c.warn	Tue Oct 22 18:44:21 2002
+++ MPlayer-20021104/libmpcodecs/vf_1bpp.c	Mon Nov  4 16:07:22 2002
@@ -165,7 +165,7 @@
 }
 
 static int open(vf_instance_t *vf, char* args){
-    unsigned int i;
+/*    unsigned int i;*/
     vf->config=config;
     vf->put_image=put_image;
     vf->query_format=query_format;
--- MPlayer-20021104/libmpcodecs/vf_2xsai.c.warn	Fri Oct 25 18:49:33 2002
+++ MPlayer-20021104/libmpcodecs/vf_2xsai.c	Mon Nov  4 16:07:22 2002
@@ -130,7 +130,7 @@
 		   uint8 *dst, uint32 dst_pitch,
 		   uint32 width, uint32 height, int sbpp) {
 
-	int j;
+/*	int j;*/
 	unsigned int x, y;
 	unsigned long color[16];
 
--- MPlayer-20021104/libmpcodecs/vf_il.c.warn	Sat Nov  2 18:43:42 2002
+++ MPlayer-20021104/libmpcodecs/vf_il.c	Mon Nov  4 16:07:22 2002
@@ -49,7 +49,7 @@
 
 /***************************************************************************/
 
-static int interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){
+static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){
 	const int a= swap;
 	const int b= 1-a;
 	const int m= h>>1;
@@ -124,7 +124,7 @@
 }
 
 static int open(vf_instance_t *vf, char* args){
-	char *pos, *max;
+/*	char *pos, *max;*/
 
 	vf->put_image=put_image;
 //	vf->get_image=get_image;
--- MPlayer-20021104/libmpcodecs/vf_boxblur.c.warn	Fri Nov  1 00:26:11 2002
+++ MPlayer-20021104/libmpcodecs/vf_boxblur.c	Mon Nov  4 16:07:22 2002
@@ -177,7 +177,7 @@
 }
 
 static int open(vf_instance_t *vf, char* args){
-	char *pos, *max;
+/*	char *pos, *max;*/
 	int e;
 
 	vf->config=config;
--- MPlayer-20021104/libmpcodecs/ve_vfw.c.warn	Wed Oct  2 00:22:37 2002
+++ MPlayer-20021104/libmpcodecs/ve_vfw.c	Mon Nov  4 16:07:22 2002
@@ -74,9 +74,9 @@
   ICINFO icinfo;
 
   ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO));
-  printf("%d - %d - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
-printf("Compressor type: %.4x\n", icinfo.fccType);
-printf("Compressor subtype: %.4x\n", icinfo.fccHandler);
+  printf("%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
+printf("Compressor type: %.4lx\n", icinfo.fccType);
+printf("Compressor subtype: %.4lx\n", icinfo.fccHandler);
 printf("Compressor flags: %lu, version %lu, ICM version: %lu\n",
     icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM);
 //printf("Compressor name: %s\n", icinfo.szName);
@@ -130,21 +130,21 @@
 //  if(verbose) {
     printf("Starting compression:\n");
     printf(" Input format:\n");
-	printf("  biSize %ld\n", input_bih->biSize);
-	printf("  biWidth %ld\n", input_bih->biWidth);
-	printf("  biHeight %ld\n", input_bih->biHeight);
+	printf("  biSize %d\n", input_bih->biSize);
+	printf("  biWidth %d\n", input_bih->biWidth);
+	printf("  biHeight %d\n", input_bih->biHeight);
 	printf("  biPlanes %d\n", input_bih->biPlanes);
 	printf("  biBitCount %d\n", input_bih->biBitCount);
-	printf("  biCompression 0x%lx ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression);
-	printf("  biSizeImage %ld\n", input_bih->biSizeImage);
+	printf("  biCompression 0x%x ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression);
+	printf("  biSizeImage %d\n", input_bih->biSizeImage);
     printf(" Output format:\n");
-	printf("  biSize %ld\n", output_bih->biSize);
-	printf("  biWidth %ld\n", output_bih->biWidth);
-	printf("  biHeight %ld\n", output_bih->biHeight);
+	printf("  biSize %d\n", output_bih->biSize);
+	printf("  biWidth %d\n", output_bih->biWidth);
+	printf("  biHeight %d\n", output_bih->biHeight);
 	printf("  biPlanes %d\n", output_bih->biPlanes);
 	printf("  biBitCount %d\n", output_bih->biBitCount);
-	printf("  biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
-	printf("  biSizeImage %ld\n", output_bih->biSizeImage);
+	printf("  biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
+	printf("  biSizeImage %d\n", output_bih->biSizeImage);
 //  }
 
   output_bih->biWidth=input_bih->biWidth;
@@ -165,13 +165,13 @@
   mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
 
     printf(" Output format after query/begin:\n");
-	printf("  biSize %ld\n", output_bih->biSize);
-	printf("  biWidth %ld\n", output_bih->biWidth);
-	printf("  biHeight %ld\n", output_bih->biHeight);
+	printf("  biSize %d\n", output_bih->biSize);
+	printf("  biWidth %d\n", output_bih->biWidth);
+	printf("  biHeight %d\n", output_bih->biHeight);
 	printf("  biPlanes %d\n", output_bih->biPlanes);
 	printf("  biBitCount %d\n", output_bih->biBitCount);
-	printf("  biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
-	printf("  biSizeImage %ld\n", output_bih->biSizeImage);
+	printf("  biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
+	printf("  biSizeImage %d\n", output_bih->biSizeImage);
   
   encoder_buf_size=input_bih->biSizeImage;
   encoder_buf=malloc(encoder_buf_size);
--- MPlayer-20021104/libmpcodecs/ve_xvid.c.warn	Sun Nov  3 18:35:42 2002
+++ MPlayer-20021104/libmpcodecs/ve_xvid.c	Mon Nov  4 16:07:22 2002
@@ -50,6 +50,7 @@
 };
 
 extern char* passtmpfile;
+extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags);
 
 static int xvidenc_pass = 0;
 static int xvidenc_quality = sizeof(divx4_motion_presets) / sizeof(divx4_motion_presets[0]) - 1; /* best quality */
--- MPlayer-20021104/libmpdemux/aviprint.c.warn	Sun Sep 22 18:39:22 2002
+++ MPlayer-20021104/libmpdemux/aviprint.c	Mon Nov  4 16:07:22 2002
@@ -64,7 +64,7 @@
   if(h->wFormatTag==0x55 && h->cbSize>=12){
       MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h;
       printf("mp3.wID=%d\n",h2->wID);
-      printf("mp3.fdwFlags=0x%X\n",h2->fdwFlags);
+      printf("mp3.fdwFlags=0x%lX\n",h2->fdwFlags);
       printf("mp3.nBlockSize=%d\n",h2->nBlockSize);
       printf("mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock);
       printf("mp3.nCodecDelay=%d\n",h2->nCodecDelay);
@@ -83,13 +83,13 @@
 
 void print_video_header(BITMAPINFOHEADER *h){
   printf("======= VIDEO Format ======\n");
-	printf("  biSize %ld\n", h->biSize);
-	printf("  biWidth %ld\n", h->biWidth);
-	printf("  biHeight %ld\n", h->biHeight);
+	printf("  biSize %d\n", h->biSize);
+	printf("  biWidth %d\n", h->biWidth);
+	printf("  biHeight %d\n", h->biHeight);
 	printf("  biPlanes %d\n", h->biPlanes);
 	printf("  biBitCount %d\n", h->biBitCount);
-	printf("  biCompression %ld='%.4s'\n", h->biCompression, (char *)&h->biCompression);
-	printf("  biSizeImage %ld\n", h->biSizeImage);
+	printf("  biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
+	printf("  biSizeImage %d\n", h->biSizeImage);
   printf("===========================\n");
 }
 
--- MPlayer-20021104/libmpdemux/open.c.warn	Thu Oct 24 00:56:30 2002
+++ MPlayer-20021104/libmpdemux/open.c	Mon Nov  4 16:07:22 2002
@@ -22,6 +22,7 @@
 #ifdef STREAMING
 #include "url.h"
 #include "network.h"
+extern int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url);
 #ifdef STREAMING_LIVE_DOT_COM
 #include "demux_rtp.h"
 int isSDPFile = 0;
@@ -531,7 +532,7 @@
 int dvd_parse_chapter_range(struct config *conf, const char *range){
   const char *s;
   char *t;
-  conf; /* prevent warning from GCC */
+/*  conf; prevent warning from GCC */
   s = range;
   dvd_chapter = 1;
   dvd_last_chapter = 0;
--- MPlayer-20021104/libmpdemux/demux_asf.c.warn	Sun Sep 22 18:39:22 2002
+++ MPlayer-20021104/libmpdemux/demux_asf.c	Mon Nov  4 16:07:22 2002
@@ -232,7 +232,7 @@
 	      unsigned int rlen;
 	      //
               int len;
-              unsigned int time2;
+              unsigned int time2=0;
 	      int keyframe=0;
 
               if(p>=p_end) mp_msg(MSGT_DEMUX,MSGL_V,"Warning! invalid packet 1, sig11 coming soon...\n");
@@ -344,6 +344,9 @@
 
 #include "stheader.h"
 
+extern void resync_audio_stream(sh_audio_t *sh_audio);
+extern void skip_audio_frame(sh_audio_t *sh_audio);
+
 void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,int flags){
     demux_stream_t *d_audio=demuxer->audio;
     demux_stream_t *d_video=demuxer->video;
--- MPlayer-20021104/libmpdemux/demux_avi.c.warn	Sun Nov  3 18:35:43 2002
+++ MPlayer-20021104/libmpdemux/demux_avi.c	Mon Nov  4 16:07:22 2002
@@ -566,6 +566,7 @@
 }
 
 //extern float initial_pts_delay;
+extern void resync_audio_stream(sh_audio_t *sh_audio);
 
 void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
     avi_priv_t *priv=demuxer->priv;
--- MPlayer-20021104/libmpdemux/demux_mpg.c.warn	Wed Oct  9 21:40:14 2002
+++ MPlayer-20021104/libmpdemux/demux_mpg.c	Mon Nov  4 16:07:22 2002
@@ -345,6 +345,9 @@
   return 1;
 }
 
+extern void resync_audio_stream(sh_audio_t *sh_audio);
+extern void skip_audio_frame(sh_audio_t *sh_audio);
+
 void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags){
     demux_stream_t *d_audio=demuxer->audio;
     demux_stream_t *d_video=demuxer->video;
--- MPlayer-20021104/libmpdemux/demuxer.c.warn	Sun Nov  3 18:35:43 2002
+++ MPlayer-20021104/libmpdemux/demuxer.c	Mon Nov  4 16:07:22 2002
@@ -522,6 +522,7 @@
 extern void demux_open_y4m(demuxer_t *demuxer);
 extern int roq_check_file(demuxer_t *demuxer);
 extern int pva_check_file(demuxer_t * demuxer);
+extern demuxer_t * demux_open_pva(demuxer_t * demuxer);
 extern int real_check_file(demuxer_t *demuxer);
 extern void demux_open_real(demuxer_t *demuxer);
 extern int nuv_check_file(demuxer_t *demuxer);
@@ -531,6 +532,7 @@
 extern int demux_rawaudio_open(demuxer_t* demuxer);
 extern int smjpeg_check_file(demuxer_t *demuxer);
 extern int demux_open_smjpeg(demuxer_t* demuxer);
+extern int bmp_check_file(demuxer_t *demuxer);
 
 extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);
 
--- MPlayer-20021104/libmpdemux/tv.c.warn	Sun Oct 27 01:06:16 2002
+++ MPlayer-20021104/libmpdemux/tv.c	Mon Nov  4 16:07:22 2002
@@ -29,6 +29,7 @@
 #include "stheader.h"
 
 #include "../libao2/afmt.h"
+#include "../libao2/audio_out.h"
 #include "../libvo/img_format.h"
 #include "../libvo/fastmemcpy.h"
 
@@ -108,6 +109,10 @@
     return 1;
 }
 
+ /* forward declarations */
+int tv_set_freq(tvi_handle_t *tvh, unsigned long freq);
+int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq);
+
 static int open_tv(tvi_handle_t *tvh)
 {
     int i;
--- MPlayer-20021104/libmpdemux/tvi_def.h.warn	Fri Apr 12 12:40:38 2002
+++ MPlayer-20021104/libmpdemux/tvi_def.h	Mon Nov  4 16:07:22 2002
@@ -1,4 +1,5 @@
 #include <stdlib.h> /* malloc */
+#include <string.h> /* memset */
 
 static int init(priv_t *priv);
 static int uninit(priv_t *priv);
--- MPlayer-20021104/libmpdemux/demux_real.c.warn	Mon Nov  4 13:36:51 2002
+++ MPlayer-20021104/libmpdemux/demux_real.c	Mon Nov  4 16:07:22 2002
@@ -733,6 +733,8 @@
   }//    goto loop;
 }
 
+extern void print_wave_header(WAVEFORMATEX *h);
+
 void demux_open_real(demuxer_t* demuxer)
 {
     real_priv_t* priv = demuxer->priv;
--- MPlayer-20021104/libmpdemux/demux_audio.c.warn	Sun Nov  3 18:35:43 2002
+++ MPlayer-20021104/libmpdemux/demux_audio.c	Mon Nov  4 16:07:22 2002
@@ -28,6 +28,7 @@
 
 extern void free_sh_audio(sh_audio_t* sh);
 extern void resync_audio_stream(sh_audio_t *sh_audio);
+extern void print_wave_header(WAVEFORMATEX *h);
 
 int hr_mp3_seek = 0;
 
--- MPlayer-20021104/libmpdemux/demux_ogg.c.warn	Sun Nov  3 18:35:43 2002
+++ MPlayer-20021104/libmpdemux/demux_ogg.c	Mon Nov  4 16:07:22 2002
@@ -440,6 +440,9 @@
   
 }
 
+extern void print_wave_header(WAVEFORMATEX *h);
+extern void print_video_header(BITMAPINFOHEADER *h);
+
 /// Open an ogg physical stream
 int demux_ogg_open(demuxer_t* demuxer) {
   ogg_demuxer_t* ogg_d;
@@ -869,6 +872,8 @@
 
 }
 
+extern void resync_audio_stream(sh_audio_t *sh_audio);
+
 void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,int flags) {
   ogg_demuxer_t* ogg_d = demuxer->priv;
   ogg_sync_state* sync = &ogg_d->sync;
--- MPlayer-20021104/libvo/geometry.c.warn	Wed Oct 23 18:52:54 2002
+++ MPlayer-20021104/libvo/geometry.c	Mon Nov  4 16:07:22 2002
@@ -2,7 +2,9 @@
 
 #include "geometry.h"
 #include "../mp_msg.h"
+#include "../mplayer.h" /* exit_player() */
 #include <string.h>
+#include <stdlib.h> /* strtol */
 
 /* A string of the form xpos[%]:ypos[%] */
 char *vo_geometry = NULL;
@@ -53,7 +55,7 @@
 			return geometry_error();
 	}
 
-	if(*colpos != '\0')
+	if(*colpos != '\0') {
 		if(vo_geometry[glen - 1] == '%') {
 			if(!get_num(colpos + 1, &yper, vo_geometry + glen - 1))
 				return geometry_error();
@@ -61,6 +63,7 @@
 			if(!get_num(colpos + 1, ypos, vo_geometry + glen))
 				return geometry_error();
 		}
+	}
 
 	if(xper)
 		*xpos = (scrw - vidw) * ((float)xper / 100.0);
--- MPlayer-20021104/libvo/aclib.c.warn	Sat Aug 24 15:36:14 2002
+++ MPlayer-20021104/libvo/aclib.c	Mon Nov  4 16:07:22 2002
@@ -9,6 +9,7 @@
 */
 #include <stddef.h>
 #include "../cpudetect.h"
+#include "fastmemcpy.h"
 
 #define BLOCK_SIZE 4096
 #define CONFUSION_FACTOR 0
@@ -177,6 +178,7 @@
 #endif
 
 #endif //!RUNTIME_CPUDETECT
+	return to;
 }
 
 #endif /* use fastmemcpy */
--- MPlayer-20021104/libvo/vo_null.c.warn	Thu Aug 29 01:34:29 2002
+++ MPlayer-20021104/libvo/vo_null.c	Mon Nov  4 16:07:22 2002
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include "config.h"
 #include "video_out.h"
--- MPlayer-20021104/libvo/vo_tdfxfb.c.warn	Thu Oct 24 00:56:30 2002
+++ MPlayer-20021104/libvo/vo_tdfxfb.c	Mon Nov  4 16:07:22 2002
@@ -43,6 +43,7 @@
 #include "video_out_internal.h"
 #include "drivers/3dfx.h"
 #include "aspect.h"
+#include "sub.h"
 
 LIBVO_EXTERN(tdfxfb)
 
--- MPlayer-20021104/libvo/x11_common.c.warn	Mon Nov  4 13:36:51 2002
+++ MPlayer-20021104/libvo/x11_common.c	Mon Nov  4 16:07:22 2002
@@ -1103,6 +1103,7 @@
 	else if (!strcasecmp(name, "contrast")) *value = vo_contrast;
 	else if (!strcasecmp(name, "gamma")) *value = vo_gamma;
 	else return VO_NOTIMPL;
+	return VO_TRUE;
 }
 
 
--- MPlayer-20021104/libvo/vo_dga.c.warn	Sun Nov  3 18:35:44 2002
+++ MPlayer-20021104/libvo/vo_dga.c	Mon Nov  4 16:07:22 2002
@@ -246,7 +246,7 @@
 static int       vo_dga_src_offset=0;    // offset in src
 static int       vo_dga_vp_offset=0;     // offset in dest
 static int       vo_dga_bytes_per_line;  // bytes per line to copy
-static int       vo_dga_src_skip;        // bytes to skip after copying one 
+/*static int       vo_dga_src_skip;*/        // bytes to skip after copying one 
                                          // line 
                                          // (not supported yet) in src
 static int       vo_dga_vp_skip;         // dto. for dest 
@@ -333,7 +333,7 @@
 static uint32_t draw_frame( uint8_t *src[] ){
 
   int vp_skip = vo_dga_vp_skip;
-  int lpl = vo_dga_bytes_per_line >> 2; 
+/*  int lpl = vo_dga_bytes_per_line >> 2; */
   int numlines = vo_dga_lines;     
 
   char *s, *d;
@@ -366,7 +366,7 @@
   case VDM_CONV_15TO16:
         {
 	  int i;
-	  char *e;
+/*	  char *e;*/
 	  for(i=0; i< vo_dga_lines; i++){
             rgb15to16( s, d, vo_dga_bytes_per_line);
 	    d+=vo_dga_bytes_per_line;
@@ -400,7 +400,7 @@
 
 static void check_events(void)
 {
-  int e=vo_x11_check_events(mDisplay);
+  vo_x11_check_events(mDisplay);
 }
 
 //---------------------------------------------------------
--- MPlayer-20021104/libvo/vo_gl2.c.warn	Thu Oct 31 00:57:56 2002
+++ MPlayer-20021104/libvo/vo_gl2.c	Mon Nov  4 16:07:22 2002
@@ -15,6 +15,7 @@
 #include "config.h"
 #include "video_out.h"
 #include "video_out_internal.h"
+#include "sub.h"
 
 LIBVO_EXTERN(gl2)
 
@@ -61,6 +62,7 @@
 //static int texture_id=1;
 
 static GLXContext wsGLXContext;
+/*
 static int                  wsGLXAttrib[] = { GLX_RGBA,
                                        GLX_RED_SIZE,1,
                                        GLX_GREEN_SIZE,1,
@@ -68,7 +70,7 @@
                                        GLX_ALPHA_SIZE,0,
                                        GLX_DOUBLEBUFFER,
                                        None };
-
+*/
 
 static uint32_t image_width;
 static uint32_t image_height;
@@ -479,7 +481,7 @@
 static void drawTextureDisplay ()
 {
   struct TexSquare *square;
-  int x, y, xoff=0, yoff=0, wd, ht;
+  int x, y/*, xoff=0, yoff=0, wd, ht*/;
   GLenum err;
 
   glColor3f(1.0,1.0,1.0);
@@ -607,6 +609,7 @@
 	vi_list = XGetVisualInfo(dpy, VisualScreenMask, &template, &vi_num);
 	if (!vi_list) return -1;
 	best_weight = 1000000;
+	best_i = vi_num;
 	for (i = 0; i < vi_num; i++) {
 		int val, res, w = 0;
 		/* of course, the visual must support OpenGL rendering... */
--- MPlayer-20021104/libvo/mga_common.c.warn	Sun Nov  3 18:35:43 2002
+++ MPlayer-20021104/libvo/mga_common.c	Mon Nov  4 16:07:22 2002
@@ -16,7 +16,10 @@
 static uint8_t *vid_data, *frames[4];
 static int f = -1;
 
-static uint32_t               drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth;
+static uint32_t               drwX,drwY,drwWidth,drwHeight;
+#ifdef VO_XMGA
+static uint32_t               drwBorderWidth,drwDepth;
+#endif
 static uint32_t               drwcX,drwcY,dwidth,dheight;
 
 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
@@ -324,7 +327,7 @@
   case VOCTRL_SET_PANSCAN:
       if ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) // || ( !vo_fs && vo_panscan_amount ) )
        {
-        int old_y = vo_panscan_y;
+//        int old_y = vo_panscan_y;
 	panscan_calc();
 //        if ( old_y != vo_panscan_y ) 
 	set_window();
--- MPlayer-20021104/libvo/vo_gif89a.c.warn	Wed Sep 25 11:36:49 2002
+++ MPlayer-20021104/libvo/vo_gif89a.c	Mon Nov  4 16:07:22 2002
@@ -120,6 +120,9 @@
     return &vo_info;
 }
 
+/* forward declaration */
+int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette);
+
 static uint32_t draw_frame(uint8_t * src[])
 {
   uint8_t *use_data;
--- MPlayer-20021104/libvo/vo_sdl.c.warn	Sun Nov  3 18:35:44 2002
+++ MPlayer-20021104/libvo/vo_sdl.c	Mon Nov  4 16:07:22 2002
@@ -1139,8 +1139,8 @@
 {
 	struct sdl_priv_s *priv = &sdl_priv;
 	uint8_t *dst;
-	uint8_t *src;
-        int i;
+/*	uint8_t *src;
+        int i;*/
 
     SDL_OVR_LOCK(-1)
 
@@ -1195,7 +1195,7 @@
 	struct sdl_priv_s *priv = &sdl_priv;
 	SDL_Event event;
 	SDLKey keypressed = 0;
-	static int modifiers = 0;
+/*	static int modifiers = 0;*/
 	
 	/* Poll the waiting SDL Events */
 	while ( SDL_PollEvent(&event) ) {
--- MPlayer-20021104/libvo/vo_xvidix.c.warn	Mon Oct 28 16:07:23 2002
+++ MPlayer-20021104/libvo/vo_xvidix.c	Mon Nov  4 16:07:22 2002
@@ -32,6 +32,7 @@
 
 #include "vosub_vidix.h"
 #include "../vidix/vidixlib.h"
+#include "../mplayer.h" /* exit_player() */
 
 #ifdef HAVE_NEW_GUI
 #include "../Gui/interface.h"
@@ -195,7 +196,7 @@
     uint32_t d_height, uint32_t flags, char *title, uint32_t format)
 {
     XVisualInfo vinfo;
-    XSizeHints hint;
+/*    XSizeHints hint;*/
     XSetWindowAttributes xswa;
     unsigned long xswamask;
     XWindowAttributes attribs;
--- MPlayer-20021104/libvo/vosub_vidix.c.warn	Thu Oct 10 10:11:54 2002
+++ MPlayer-20021104/libvo/vosub_vidix.c	Mon Nov  4 16:07:22 2002
@@ -49,7 +49,7 @@
 static vidix_fourcc_t	  vidix_fourcc;
 static vo_functions_t *   vo_server;
 static vidix_yuv_t	  dstrides;
-static uint32_t (*server_control)(uint32_t request, void *data, ...);
+/*static uint32_t (*server_control)(uint32_t request, void *data, ...);*/
 
 static int  vidix_get_video_eq(vidix_video_eq_t *info);
 static int  vidix_set_video_eq(const vidix_video_eq_t *info);
--- MPlayer-20021104/libvo/vosub_vidix.h.warn	Thu Aug 29 01:34:29 2002
+++ MPlayer-20021104/libvo/vosub_vidix.h	Mon Nov  4 16:07:22 2002
@@ -21,6 +21,7 @@
 int	 vidix_start(void);
 int	 vidix_stop(void);
 void     vidix_term( void );
+uint32_t vidix_control(uint32_t request, void *data, ...);
 uint32_t vidix_query_fourcc(unsigned fourcc);
 
 uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
--- MPlayer-20021104/libvo/vo_dxr3.c.warn	Mon Nov  4 13:36:51 2002
+++ MPlayer-20021104/libvo/vo_dxr3.c	Mon Nov  4 16:16:54 2002
@@ -108,9 +108,11 @@
 #include <stdio.h>
 #include <time.h>
 #include <math.h>
-#include <malloc.h>
 
 #include "config.h"
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 #include "fastmemcpy.h"
 
 #include "video_out.h"
--- MPlayer-20021104/libvo/sub.c.warn	Wed Oct  9 21:40:15 2002
+++ MPlayer-20021104/libvo/sub.c	Mon Nov  4 16:17:26 2002
@@ -4,6 +4,10 @@
 #include <string.h>
 
 #include "config.h"
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
 #include "mp_msg.h"
 #include "video_out.h"
 #include "font_load.h"
@@ -434,7 +438,7 @@
 inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys)
 {
   unsigned int bbox[4];
-  int i;
+/*  int i;*/
   spudec_calc_bbox(vo_spudec, dxs, dys, bbox);
   obj->bbox.x1 = bbox[0];
   obj->bbox.x2 = bbox[1];
--- MPlayer-20021104/libvo/font_load_ft.c.warn	Thu Aug 29 23:19:38 2002
+++ MPlayer-20021104/libvo/font_load_ft.c	Mon Nov  4 16:18:52 2002
@@ -732,7 +732,7 @@
     int inbytesleft = 1;
     int outbytesleft = sizeof(FT_ULong);
 
-    size_t count = iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+    iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
 
     /* convert unicode BigEndian -> MachineEndian */
     o = be2me_32(o);
@@ -785,7 +785,9 @@
 }
 
 static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *charcodes) {
+#ifdef HAVE_FREETYPE21
     FT_ULong  charcode;
+#endif
     FT_UInt   gindex;
     int i,j;
 
--- MPlayer-20021104/postproc/rgb2rgb.c.warn	Tue Sep 10 22:25:24 2002
+++ MPlayer-20021104/postproc/rgb2rgb.c	Mon Nov  4 16:07:22 2002
@@ -13,6 +13,7 @@
 #include "../cpudetect.h"
 #include "../mangle.h"
 #include "../bswap.h"
+#include "../libvo/fastmemcpy.h"
 
 #ifdef ARCH_X86
 #define CAN_COMPILE_X86_ASM
--- MPlayer-20021104/vidix/drivers/mga_vid.c.warn	Thu Aug 29 01:34:29 2002
+++ MPlayer-20021104/vidix/drivers/mga_vid.c	Mon Nov  4 16:22:40 2002
@@ -777,7 +777,7 @@
     	return(EFAULT);
     }
     mga_src_base &= (~0xFFFF); /* 64k boundary */
-    if (mga_verbose > 1) printf("[mga] YUV buffer base: %p\n", mga_src_base);
+    if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base);
 
     config->dga_addr = mga_mem_base + mga_src_base;
 
@@ -1325,7 +1325,7 @@
 	}
     }
 
-    if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %p, framebuffer: %p\n",
+    if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %#x, framebuffer: %#x\n",
         pci_info.base1, pci_info.base0);
 
     mga_mmio_base = map_phys_mem(pci_info.base1,0x4000);
--- MPlayer-20021104/libmpdvdkit2/css.c.warn	Sat Aug 17 00:50:21 2002
+++ MPlayer-20021104/libmpdvdkit2/css.c	Mon Nov  4 16:23:11 2002
@@ -301,7 +301,7 @@
     if(dvdcss->psz_cache){
 	int fd;
 	key_file=malloc(strlen(dvdcss->psz_cache)+12+4);
-	sprintf(key_file,"%s/%0.10x",dvdcss->psz_cache,i_block);
+	sprintf(key_file,"%s/%.10x",dvdcss->psz_cache,i_block);
 	if ( (fd=open( key_file,O_RDONLY ) ) > 0 ){
 	    if(read(fd, p_title_key, 5)==5){
 		// success!
--- MPlayer-20021104/libmpdvdkit2/libdvdcss.c.warn	Mon Nov  4 16:07:22 2002
+++ MPlayer-20021104/libmpdvdkit2/libdvdcss.c	Mon Nov  4 16:43:11 2002
@@ -269,7 +269,7 @@
     /* if the CACHE is enabled, extract some unique disc ID */
     if(dvdcss_cache_dir){
 	char* disc_id=NULL;
-	char title_name[64];
+	/*char title_name[64];*/
 	char sector[DVDCSS_BLOCK_SIZE];
 	// 32768+40  -> disc title (32 uppercase chars)
 	// 32768+813 -> disc manufacturing date + serial no (16 digit number)
@@ -289,14 +289,14 @@
 	        for ( i=0;i<16;i++ )
 		    if ( ( title_name[i] < '0' )||( title_name[i] > '9' ) ){
 		        disc_id=malloc(16+4);
-	                sprintf( disc_id,"%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
+	                sprintf( disc_id,"%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
 			break;
 		    }
 		if(!disc_id) disc_id=strdup(title_name);
 	    }
 	    if(disc_id){
 		// yeah, we have a disc name/id, let's set up cache path:
-		char* dir;
+		/*char* dir;*/
 		dvdcss->psz_cache = malloc(strlen(dvdcss_cache_dir)+strlen(disc_id)+4);
 		sprintf(dvdcss->psz_cache,"%s/%s",dvdcss_cache_dir,disc_id);
 		mkdir( dvdcss->psz_cache,493 );
--- MPlayer-20021104/libmpdvdkit2/nav_read.c.warn	Sat Aug 17 00:50:22 2002
+++ MPlayer-20021104/libmpdvdkit2/nav_read.c	Mon Nov  4 16:44:10 2002
@@ -95,7 +95,7 @@
   /* pci hli btnit */
   for(i = 0; i < pci->hli.hl_gi.btngr_ns; i++) {
     for(j = 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) {
-      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;
+/*      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;*/
       assert(pci->hli.btnit[n].zero1 == 0);
       assert(pci->hli.btnit[n].zero2 == 0);
       assert(pci->hli.btnit[n].zero3 == 0);
--- MPlayer-20021104/mplayer.c.warn	Sun Nov  3 18:35:38 2002
+++ MPlayer-20021104/mplayer.c	Mon Nov  4 16:07:22 2002
@@ -129,6 +129,8 @@
 #include "libmpcodecs/dec_video.h"
 //#include "libmpcodecs/vf.h"
 
+extern void vf_list_plugins();
+
 //**************************************************************************//
 //**************************************************************************//
 
@@ -381,6 +383,10 @@
   current_module=NULL;
 }
 
+#ifdef X11_FULLSCREEN
+extern void vo_uninit( void );
+#endif
+
 void exit_player(char* how){
 
   uninit_player(INITED_ALL);
--- MPlayer-20021104/cpudetect.c.warn	Tue May 28 17:50:53 2002
+++ MPlayer-20021104/cpudetect.c	Mon Nov  4 16:07:22 2002
@@ -12,6 +12,7 @@
 #ifdef ARCH_X86
 
 #include <stdio.h>
+#include <string.h>
 
 #ifdef __FreeBSD__
 #include <sys/types.h>
--- MPlayer-20021104/cfgparser.c.warn	Thu Oct 24 00:56:28 2002
+++ MPlayer-20021104/cfgparser.c	Mon Nov  4 16:07:22 2002
@@ -763,7 +763,7 @@
 				goto err_missing_param;
 
 			if (sscanf(param, sizeof(off_t) == sizeof(int) ?
-			"%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
+			"%d%c" : "%lld%c", &tmp_off, (char *)&dummy) != 1) {
 				mp_msg(MSGT_CFGPARSER, MSGL_ERR, "parameter must be an integer: %s\n", param);
 				ret = ERR_OUT_OF_RANGE;
 				goto out;
--- MPlayer-20021104/subreader.c.warn	Thu Oct 31 00:57:54 2002
+++ MPlayer-20021104/subreader.c	Mon Nov  4 16:07:22 2002
@@ -243,7 +243,7 @@
 		char *curptr=current->text[i]=(char *)malloc (len+1);
 		if (!current->text[i]) return ERR;
 		//strncpy (current->text[i], line, len); current->text[i][len]='\0';
-                for(j; j<len; j++) {
+                for(; j<len; j++) {
 		    /* let's filter html tags ::atmos */
 		    if(line[j]=='>') {
 			skip=0;
--- MPlayer-20021104/sub_cc.c.warn	Sun Sep 22 18:39:05 2002
+++ MPlayer-20021104/sub_cc.c	Mon Nov  4 16:07:22 2002
@@ -15,6 +15,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "sub_cc.h"
 
--- MPlayer-20021104/mencoder.c.warn	Sun Nov  3 18:35:38 2002
+++ MPlayer-20021104/mencoder.c	Mon Nov  4 16:47:57 2002
@@ -289,6 +289,7 @@
     aviwrite_write_chunk(muxer,s,muxer_f,len,flags);
 }
 
+extern void print_wave_header(WAVEFORMATEX *h);
 
 int main(int argc,char* argv[]){
 
@@ -684,7 +685,7 @@
 	mux_a->h.dwScale=mux_a->h.dwSampleSize;
 	mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
     }
-    printf("audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d bps=%d sample=%d)\n",
+    printf("audiocodec: framecopy (format=%x chans=%d rate=%ld bits=%d bps=%ld sample=%ld)\n",
 	mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec,
 	mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize);
     break;
@@ -1194,7 +1195,7 @@
     mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
     mux_a->h.dwScale=1;
     mux_a->wf->nBlockAlign=1;
-    printf("\n\nCBR audio: %d bytes/sec, %d bytes/block\n",
+    printf("\n\nCBR audio: %ld bytes/sec, %d bytes/block\n",
 	    mux_a->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize);
 }
 #endif
--- MPlayer-20021104/divx4_vbr.c.warn	Wed Sep 25 11:36:47 2002
+++ MPlayer-20021104/divx4_vbr.c	Mon Nov  4 16:53:20 2002
@@ -62,7 +62,7 @@
 
 static int m_iCount;
 static int m_iQuant;
-static int m_iCrispness;
+/*static int m_iCrispness;*/
 static short m_bDrop;
 static float m_fQuant;
 
@@ -178,7 +178,7 @@
 
 	
 		while(!feof(m_pFile)) 
-      {  fscanf(m_pFile, "Frame %d: intra %d, quant %d, texture %d, motion %d, total %d\n",
+      {  fscanf(m_pFile, "Frame %d: intra %hd, quant %d, texture %d, motion %d, total %d\n",
          &iNumFrames, &(vFrame.is_key_frame), &(vFrame.quant), &(vFrame.text_bits), &(vFrame.motion_bits), &(vFrame.total_bits));
 
                 vFrame.total_bits+=vFrame.text_bits*(qual_multiplier-1);
@@ -208,7 +208,7 @@
 	   fseek(m_pFile, lFrameStart, SEEK_SET);		// start again
 		
 		for (i=0;i<iNumFrames;i++)
-		{  fscanf(m_pFile, "Frame %d: intra %d, quant %d, texture %d, motion %d, total %d\n",
+		{  fscanf(m_pFile, "Frame %d: intra %hd, quant %d, texture %d, motion %d, total %d\n",
          &dummy, &(m_vFrames[i].is_key_frame), &(m_vFrames[i].quant), 
 			&(m_vFrames[i].text_bits), &(m_vFrames[i].motion_bits), 
 			&(m_vFrames[i].total_bits));
@@ -227,7 +227,7 @@
 
 	if(desired_bits<=non_text_bits)
 	{
-		char s[200];
+/*		char s[200];*/
 		printf("Specified bitrate is too low for this clip.\n"
 			"Minimum possible bitrate for the clip is %.0f kbps. Overriding\n"
 			"user-specified value.\n",
-------------- next part --------------
--- MPlayer-20021103/loader/dshow/DS_VideoDecoder.c.loader	Sun Sep 22 18:39:24 2002
+++ MPlayer-20021103/loader/dshow/DS_VideoDecoder.c	Sun Nov  3 21:21:45 2002
@@ -35,6 +35,7 @@
 #include "DS_VideoDecoder.h"
 
 #include "../wine/winerror.h"
+#include "../ldt_keeper.h"
 
 #ifndef NOAVIFILE_HEADERS
 #define VFW_E_NOT_RUNNING               0x80040226
@@ -66,7 +67,7 @@
 struct _ct {
 		unsigned int bits;
 		fourcc_t fcc;
-		GUID *subtype;
+		const GUID *subtype;
 		int cap;
 	    };
             
@@ -224,7 +225,7 @@
 		if (!result)
 		{
 		    this->m_Caps = (this->m_Caps | c->cap);
-		    printf("%.4s ", &c->fcc);
+		    printf("%.4s ", (char *)&c->fcc);
 		}
 	    }
 	    printf("\n");
--- MPlayer-20021103/loader/dshow/DS_AudioDecoder.c.loader	Tue May 28 17:51:37 2002
+++ MPlayer-20021103/loader/dshow/DS_AudioDecoder.c	Sun Nov  3 21:20:15 2002
@@ -24,6 +24,7 @@
 };
 
 #include "DS_AudioDecoder.h"
+#include "../ldt_keeper.h"
 
 #include <string.h>
 #include <stdio.h>
--- MPlayer-20021103/loader/wine/windef.h.loader	Sun Sep  1 11:45:51 2002
+++ MPlayer-20021103/loader/wine/windef.h	Sun Nov  3 20:52:49 2002
@@ -156,8 +156,8 @@
 typedef int             INT;
 typedef unsigned int    UINT;
 typedef unsigned short  WORD;
-typedef unsigned int    DWORD;
-typedef unsigned int    ULONG;
+typedef unsigned long   DWORD;
+typedef unsigned long   ULONG;
 typedef unsigned char   BYTE;
 typedef long            LONG;
 typedef short           SHORT;
--- MPlayer-20021103/loader/win32.c.loader	Mon Oct 14 01:37:27 2002
+++ MPlayer-20021103/loader/win32.c	Sun Nov  3 21:07:36 2002
@@ -26,6 +26,7 @@
 #include "registry.h"
 #include "loader.h"
 #include "com.h"
+#include "ext.h"
 
 #include <stdlib.h>
 #include <assert.h>
@@ -1256,7 +1257,7 @@
 #else
     struct CRITSECT* cs = (*(struct CRITSECT**)c);
 #endif
-    dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:NULL);
+    dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:0);
     if (!cs)
     {
 	dbgprintf("entered uninitialized critisec!\n");
@@ -1628,8 +1629,8 @@
 {
     pthread_mutex_t *pm;
     pthread_cond_t  *pc;
-    mutex_list* pp;
-    /*
+/*    mutex_list* pp;
+
      printf("CreateSemaphoreA(%p = %s)\n", name, (name ? name : "<null>"));
      pp=mlist;
      while(pp)
@@ -2044,7 +2045,7 @@
 
 static int WINAPI expGetStartupInfoA(STARTUPINFOA *s)
 {
-    int i;
+/*    int i;*/
     dbgprintf("GetStartupInfoA(0x%x) => 1\n");
     memset(s, 0, sizeof(*s));
     s->cb=sizeof(*s);
@@ -2133,7 +2134,7 @@
 {
     int result = 0;
     char* lastbc;
-    int i;
+/*    int i;*/
     if (!name)
 	return -1;
     // we skip to the last backslash
@@ -2398,7 +2399,7 @@
 						const char* string,
 						const char* filename)
 {
-    int size=256;
+/*    int size=256;*/
     char* fullname;
     dbgprintf("WritePrivateProfileStringA('%s', '%s', '%s', '%s')", appname, keyname, string, filename );
     if(!(appname && keyname && filename) )
@@ -2703,7 +2704,7 @@
 #define SECS_1601_TO_1970  ((369 * 365 + 89) * 86400ULL)
 static void WINAPI expGetSystemTimeAsFileTime(FILETIME* systime)
 {
-    struct tm *local_tm;
+/*    struct tm *local_tm;*/
     struct timeval tv;
     unsigned long long secs;
 
@@ -2717,7 +2718,7 @@
 
 static int WINAPI expGetEnvironmentVariableA(const char* name, char* field, int size)
 {
-    char *p;
+/*    char *p;*/
     //    printf("%s %x %x\n", name, field, size);
     if(field)field[0]=0;
     /*
@@ -3810,7 +3811,7 @@
 
 static void WINAPI expExitProcess( DWORD status )
 {
-    printf("EXIT - code %d\n",status);
+    printf("EXIT - code %ld\n",status);
     exit(status);
 }
 
@@ -4322,7 +4323,7 @@
 
 void* LookupExternalByName(const char* library, const char* name)
 {
-    char* answ;
+/*    char* answ;*/
     int i,j;
     //   return (void*)ext_unknown;
     if(library==0)
--- MPlayer-20021103/loader/ext.c.loader	Sun Sep 15 19:34:40 2002
+++ MPlayer-20021103/loader/ext.c	Sun Nov  3 20:52:49 2002
@@ -75,7 +75,7 @@
 
 LPVOID WINAPI HeapAlloc(HANDLE heap, DWORD flags, DWORD size)
 {
-    static int i = 5;
+/*    static int i = 5;*/
     void* m = (flags & 0x8) ? calloc(size, 1) : malloc(size);
     //printf("HeapAlloc %p  %d  (%d)\n", m, size, flags);
     //if (--i == 0)
@@ -327,7 +327,7 @@
       printf("offsets larger than 4Gb not supported\n");
     return munmap( start, size_low );
 }
-static int mapping_size=0;
+/*static int mapping_size=0;*/
 
 struct file_mapping_s;
 typedef struct file_mapping_s
--- MPlayer-20021103/loader/module.c.loader	Sun Sep 15 19:34:41 2002
+++ MPlayer-20021103/loader/module.c	Sun Nov  3 20:52:49 2002
@@ -184,7 +184,7 @@
 static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
 {
     WIN_BOOL retv = TRUE;
-    int i;
+/*    int i;*/
     assert( wm );
 
     /* prevent infinite recursion in case of cyclical dependencies */
@@ -245,7 +245,7 @@
 static void MODULE_DllProcessDetach( WINE_MODREF* wm, WIN_BOOL bForceDetach, LPVOID lpReserved )
 {
     //    WINE_MODREF *wm=local_wm;
-    modref_list* l = local_wm;
+/*    modref_list* l = local_wm;*/
     wm->flags &= ~WINE_MODREF_PROCESS_ATTACHED;
     MODULE_InitDll( wm, DLL_PROCESS_DETACH, lpReserved );
 /*    while (l)
@@ -272,7 +272,7 @@
 {
 	DWORD err = GetLastError();
 	WINE_MODREF *pwm;
-	int i;
+/*	int i;*/
 //	module_loadorder_t *plo;
 
         SetLastError( ERROR_FILE_NOT_FOUND );
--- MPlayer-20021103/loader/pe_image.c.loader	Sun Sep 15 19:34:41 2002
+++ MPlayer-20021103/loader/pe_image.c	Sun Nov  3 20:52:49 2002
@@ -281,7 +281,7 @@
      */
  
     for (i = 0, pe_imp = pem->pe_import; pe_imp->Name ; pe_imp++) {
-    	WINE_MODREF		*wmImp;
+/*    	WINE_MODREF		*wmImp;*/ /* unused */
 	IMAGE_IMPORT_BY_NAME	*pe_name;
 	PIMAGE_THUNK_DATA	import_list,thunk_list;
  	char			*name = (char *) RVA(pe_imp->Name);
@@ -436,7 +436,7 @@
     IMAGE_NT_HEADERS *nt;
     IMAGE_SECTION_HEADER *pe_sec;
     IMAGE_DATA_DIRECTORY *dir;
-    BY_HANDLE_FILE_INFORMATION bhfi;
+/*    BY_HANDLE_FILE_INFORMATION bhfi; */
     int	i, rawsize, lowest_va, vma_size, file_size = 0;
     DWORD load_addr = 0, aoep, reloc = 0;
 //    struct get_read_fd_request *req = get_req_buffer();
@@ -696,7 +696,7 @@
     IMAGE_EXPORT_DIRECTORY *pe_export = NULL;
     IMAGE_RESOURCE_DIRECTORY *pe_resource = NULL;
     WINE_MODREF *wm;
-    int	result;
+/*    int	result; */
 
 
     
--- MPlayer-20021103/loader/driver.c.loader	Sun Sep 15 19:34:40 2002
+++ MPlayer-20021103/loader/driver.c	Sun Nov  3 21:09:28 2002
@@ -17,6 +17,7 @@
 #include "registry.h"
 #include "ldt_keeper.h"
 #include "driver.h"
+#include "ext.h"
 
 extern char* def_path;
 
@@ -127,7 +128,7 @@
 HDRVR DrvOpen(LPARAM lParam2)
 {
     NPDRVR hDriver;
-    int i;
+/*    int i;*/
     char unknown[0x124];
     const char* filename = (const char*) ((ICOPEN*) lParam2)->pV1Reserved;
 
--- MPlayer-20021103/loader/elfdll.c.loader	Sun Sep 15 19:34:40 2002
+++ MPlayer-20021103/loader/elfdll.c	Sun Nov  3 21:14:01 2002
@@ -166,10 +166,10 @@
 static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path)
 {
 //	IMAGE_NT_HEADERS *nt = PE_HEADER(hModule);
-	IMAGE_DATA_DIRECTORY *dir;
-	IMAGE_IMPORT_DESCRIPTOR *pe_import = NULL;
+//	IMAGE_DATA_DIRECTORY *dir;
+//	IMAGE_IMPORT_DESCRIPTOR *pe_import = NULL;
 	WINE_MODREF *wm;
-	int len;
+//	int len;
 	HANDLE procheap = GetProcessHeap();
 
 	wm = (WINE_MODREF *)HeapAlloc(procheap, HEAP_ZERO_MEMORY, sizeof(*wm));
@@ -236,7 +236,7 @@
 WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags)
 {
 	LPVOID dlhandle;
-	struct elfdll_image *image;
+/*	struct elfdll_image *image;*/
 	char name[129];
 	char soname[129];
 	WINE_MODREF *wm;
--- MPlayer-20021103/loader/resource.c.loader	Sun Sep 15 19:34:41 2002
+++ MPlayer-20021103/loader/resource.c	Sun Nov  3 21:11:46 2002
@@ -102,13 +102,13 @@
 static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc)
 {
     DWORD size = 0;
-    HRSRC hRsrc32;
+//    HRSRC hRsrc32;
 
 //    HMODULE16 hMod16   = MapHModuleLS( hModule );
 //    NE_MODULE *pModule = NE_GetPtr( hMod16 );
 //    WINE_MODREF *wm    = pModule && pModule->module32? 
 //                         MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
-    WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
+//    WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
 
     if ( !hModule || !hRsrc ) return 0;
 
@@ -131,7 +131,7 @@
 {
     HFILE hFile = HFILE_ERROR;
 
-    WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
+/*    WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );*/
 
     if ( !hModule || !hRsrc ) return HFILE_ERROR;
 
@@ -148,7 +148,7 @@
 static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc)
 {
     HGLOBAL hMem = 0;
-    HRSRC hRsrc32;
+/*    HRSRC hRsrc32;*/
     WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
 
 
--- MPlayer-20021103/loader/registry.c.loader	Sun Sep 15 19:34:41 2002
+++ MPlayer-20021103/loader/registry.c	Sun Nov  3 21:12:48 2002
@@ -256,7 +256,7 @@
 }
 static struct reg_value* insert_reg_value(int handle, const char* name, int type, const void* value, int len)
 {
-	reg_handle_t* t;
+/*	reg_handle_t* t;*/
 	struct reg_value* v;
 	char* fullname;
 	if((fullname=build_keyname(handle, name))==NULL)
@@ -504,7 +504,7 @@
 
 long RegSetValueExA(long key, const char* name, long v1, long v2, const void* data, long size)
 {
-    struct reg_value* t;
+/*    struct reg_value* t;*/
     char* c;
     TRACE("Request to set value %s %d\n", name, *(const int*)data);
     if(!regs)
--- MPlayer-20021103/loader/afl.c.loader	Sun Sep 15 19:34:40 2002
+++ MPlayer-20021103/loader/afl.c	Sun Nov  3 21:16:52 2002
@@ -187,7 +187,7 @@
     PWINE_ACMDRIVERID	padid;
     PWINE_ACMDRIVER	pad;
     ICOPEN		icopen;
-    HDRVR		hdrv;
+/*    HDRVR		hdrv;*/
 
 
     TRACE("(%p, %x, %08lu)\n", phad, hadid, fdwOpen);
@@ -429,9 +429,9 @@
 	    goto errCleanUp;
     } else {
 	PWINE_ACMDRIVERID wadi;
-	short drv_tag;
 	ret = ACMERR_NOTPOSSIBLE;
-/*	if(pwfxSrc->wFormatTag==1)//compression
+/*	short drv_tag;
+	if(pwfxSrc->wFormatTag==1)//compression
 	    drv_tag=pwfxDst->wFormatTag;
 	    else
 	    if(pwfxDst->wFormatTag==1)//decompression


More information about the MPlayer-dev-eng mailing list