changeset 8451:fb88ccbc5ccc

compiler warning fixes based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>
author arpi
date Sat, 14 Dec 2002 17:56:35 +0000
parents 8cfc9309f0cc
children 418b0017a8d2
files TOOLS/subfont-c/subfont.c liba52/imdct.c libaf/af_resample.c libao2/pl_resample.c libmpcodecs/ad_qtaudio.c libmpcodecs/vd_lcl.c libmpcodecs/vd_qtvideo.c libmpdemux/demux_mov.c libmpdemux/demux_rawaudio.c libvo/sub.c loader/dmo/DMO_AudioDecoder.c loader/dmo/DMO_VideoDecoder.c loader/driver.c loader/dshow/DS_AudioDecoder.c loader/dshow/DS_VideoDecoder.c loader/module.c loader/win32.c mencoder.c subreader.h unrarlib.c
diffstat 20 files changed, 86 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/subfont-c/subfont.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/TOOLS/subfont-c/subfont.c	Sat Dec 14 17:56:35 2002 +0000
@@ -274,7 +274,7 @@
 #ifndef NEW_DESC
 	fprintf(f, "charspace %i\n",	-2*padding);
 #endif
-	fprintf(f, "height %i\n",	f266ToInt(face->size->metrics.height));
+	fprintf(f, "height %li\n",	f266ToInt(face->size->metrics.height));
 #ifdef NEW_DESC
 	fprintf(f, "ascender %i\n",	f266CeilToInt(face->size->metrics.ascender));
 	fprintf(f, "descender %i\n",	f266FloorToInt(face->size->metrics.descender));
@@ -303,7 +303,7 @@
 	else {
 	    glyph_index = FT_Get_Char_Index(face, uni_charmap ? character:code);
 	    if (glyph_index==0) {
-		WARNING("Glyph for char 0x%02x|U+%04X|%c not found.", code, character,
+		WARNING("Glyph for char 0x%02lx|U+%04lX|%c not found.", code, character,
 			 code<' '||code>255 ? '.':code);
 		continue;
 	    }
@@ -312,7 +312,7 @@
 	// load glyph
 	error = FT_Load_Glyph(face, glyph_index, load_flags);
 	if (error) {
-	    WARNING("FT_Load_Glyph 0x%02x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+	    WARNING("FT_Load_Glyph 0x%02x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 	    continue;
 	}
 	slot = face->glyph;
@@ -321,7 +321,7 @@
 	if (slot->format != ft_glyph_format_bitmap) {
 	    error = FT_Render_Glyph(slot, ft_render_mode_normal);
 	    if (error) {
-		WARNING("FT_Render_Glyph 0x%04x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+		WARNING("FT_Render_Glyph 0x%04x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 		continue;
 	    }
 	}
@@ -329,7 +329,7 @@
 	// extract glyph image
 	error = FT_Get_Glyph(slot, (FT_Glyph*)&glyph);
 	if (error) {
-	    WARNING("FT_Get_Glyph 0x%04x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+	    WARNING("FT_Get_Glyph 0x%04x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 	    continue;
 	}
 	glyphs[glyphs_count++] = (FT_Glyph)glyph;
@@ -365,7 +365,7 @@
 	pen_xa = pen_x + f266ToInt(slot->advance.x) + 2*padding;
 
 	/* font.desc */
-	fprintf(f, "0x%04x %i %i;\tU+%04X|%c\n", unicode_desc ? character:code,
+	fprintf(f, "0x%04lx %i %i;\tU+%04lX|%c\n", unicode_desc ? character:code,
 		pen_x,						// bitmap start
 		pen_xa-1,					// bitmap end
 		character, code<' '||code>255 ? '.':code);
--- a/liba52/imdct.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/liba52/imdct.c	Sat Dec 14 17:56:35 2002 +0000
@@ -392,8 +392,8 @@
 #endif
 #include "srfftp_3dnow.h"
 
-const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = { 0x00000000UL, 0x80000000UL }; 
-const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = { 0x80000000UL, 0x00000000UL }; 
+const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }}; 
+const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }}; 
 const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
 
 #undef HAVE_3DNOWEX
--- a/libaf/af_resample.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libaf/af_resample.c	Sat Dec 14 17:56:35 2002 +0000
@@ -48,7 +48,7 @@
 // Macro to add data to circular que 
 #define ADDQUE(xi,xq,in)\
   xq[xi]=xq[xi+L]=(*in);\
-  xi=(--xi)&(L-1);
+  xi=(xi-1)&(L-1);
 
 
 
--- a/libao2/pl_resample.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libao2/pl_resample.c	Sat Dec 14 17:56:35 2002 +0000
@@ -171,7 +171,7 @@
   if(pl_resample.up==pl_resample.dn){
     register int16_t*	in    = ((int16_t*)ao_plugin_data.data);
     register int16_t* 	end   = in+ao_plugin_data.len/2;
-    while(in < end) *in=(*in++)>>1;
+    while(in < end) *(in++)>>=1;
     return 1;
   }
   if(pl_resample.up>pl_resample.dn)
--- a/libmpcodecs/ad_qtaudio.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libmpcodecs/ad_qtaudio.c	Sat Dec 14 17:56:35 2002 +0000
@@ -10,6 +10,10 @@
 #include "ad_internal.h"
 #include "bswap.h"
 
+#ifdef USE_WIN32DLL
+#include "ldt_keeper.h"
+#endif
+
 static ad_info_t info =  {
 	"QuickTime Audio Decoder",
 	"qtaudio",
--- a/libmpcodecs/vd_lcl.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libmpcodecs/vd_lcl.c	Sat Dec 14 17:56:35 2002 +0000
@@ -491,7 +491,8 @@
         for (row = 0; row < height; row++) {
           pixel_ptr = row * width * 3;
           yq = encoded[pixel_ptr++];
-          uqvq = encoded[pixel_ptr++] + (encoded[pixel_ptr++] << 8);
+          uqvq = encoded[pixel_ptr++];
+	  uqvq+=(encoded[pixel_ptr++] << 8);
           for (col = 1; col < width; col++) {
             encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
             uqvq -= (encoded[pixel_ptr+1] | (encoded[pixel_ptr+2]<<8));
@@ -505,7 +506,8 @@
         for (row = 0; row < height; row++) {
           pixel_ptr = row * width * 3;
           yq = encoded[pixel_ptr++];
-          uqvq = encoded[pixel_ptr++] + (encoded[pixel_ptr++] << 8);
+          uqvq = encoded[pixel_ptr++];
+	  uqvq+=(encoded[pixel_ptr++] << 8);
           for (col = 1; col < width; col++) {
             encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
             uqvq -= (encoded[pixel_ptr+1] | (encoded[pixel_ptr+2]<<8));
--- a/libmpcodecs/vd_qtvideo.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libmpcodecs/vd_qtvideo.c	Sat Dec 14 17:56:35 2002 +0000
@@ -8,6 +8,10 @@
 #include "mp_msg.h"
 #include "vd_internal.h"
 
+#ifdef USE_WIN32DLL
+#include "ldt_keeper.h"
+#endif
+
 static vd_info_t info = {
 	"Quicktime Video decoder",
 	"qtvideo",
@@ -100,20 +104,20 @@
 
     handler = LoadLibraryA("qtmlClient.dll");
 
-    InitializeQTML = GetProcAddress(handler, "InitializeQTML");
-    EnterMovies = GetProcAddress(handler, "EnterMovies");
-    FindNextComponent = GetProcAddress(handler, "FindNextComponent");
-    CountComponents = GetProcAddress(handler, "CountComponents");
-    GetComponentInfo = GetProcAddress(handler, "GetComponentInfo");
-    OpenComponent = GetProcAddress(handler, "OpenComponent");
-    ImageCodecInitialize = GetProcAddress(handler, "ImageCodecInitialize");
-    ImageCodecGetCodecInfo = GetProcAddress(handler, "ImageCodecGetCodecInfo");
-    ImageCodecBeginBand = GetProcAddress(handler, "ImageCodecBeginBand");
-    ImageCodecPreDecompress = GetProcAddress(handler, "ImageCodecPreDecompress");
-    ImageCodecBandDecompress = GetProcAddress(handler, "ImageCodecBandDecompress");
-    GetGWorldPixMap = GetProcAddress(handler, "GetGWorldPixMap");
-    QTNewGWorldFromPtr = GetProcAddress(handler, "QTNewGWorldFromPtr");
-    NewHandleClear = GetProcAddress(handler, "NewHandleClear");
+    InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML");
+    EnterMovies = (OSErr (*)(void))GetProcAddress(handler, "EnterMovies");
+    FindNextComponent = (Component (*)(Component,ComponentDescription*))GetProcAddress(handler, "FindNextComponent");
+    CountComponents = (long (*)(ComponentDescription*))GetProcAddress(handler, "CountComponents");
+    GetComponentInfo = (OSErr (*)(Component,ComponentDescription*,Handle,Handle,Handle))GetProcAddress(handler, "GetComponentInfo");
+    OpenComponent = (ComponentInstance (*)(Component))GetProcAddress(handler, "OpenComponent");
+    ImageCodecInitialize = (ComponentResult (*)(ComponentInstance,ImageSubCodecDecompressCapabilities *))GetProcAddress(handler, "ImageCodecInitialize");
+    ImageCodecGetCodecInfo = (ComponentResult (*)(ComponentInstance,CodecInfo *))GetProcAddress(handler, "ImageCodecGetCodecInfo");
+    ImageCodecBeginBand = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *,ImageSubCodecDecompressRecord *,long))GetProcAddress(handler, "ImageCodecBeginBand");
+    ImageCodecPreDecompress = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *))GetProcAddress(handler, "ImageCodecPreDecompress");
+    ImageCodecBandDecompress = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *))GetProcAddress(handler, "ImageCodecBandDecompress");
+    GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap");
+    QTNewGWorldFromPtr = (OSErr(*)(GWorldPtr *,OSType,const Rect *,CTabHandle,void*,GWorldFlags,void *,long))GetProcAddress(handler, "QTNewGWorldFromPtr");
+    NewHandleClear = (OSErr(*)(Size))GetProcAddress(handler, "NewHandleClear");
     //     = GetProcAddress(handler, "");
     
     if(!InitializeQTML || !EnterMovies || !FindNextComponent || !ImageCodecBandDecompress){
@@ -371,7 +375,7 @@
 
 if((int)sh->context==0x73797639){	// Sorenson 16-bit YUV -> std YVU9
 
-    short *src0=((char*)decpar.dstPixMap.baseAddr+0x20);
+    short *src0=(short *)((char*)decpar.dstPixMap.baseAddr+0x20);
 
     for(i=0;i<mpi->h;i++){
 	int x;
--- a/libmpdemux/demux_mov.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libmpdemux/demux_mov.c	Sat Dec 14 17:56:35 2002 +0000
@@ -1,5 +1,3 @@
-#define USE_QTX_CODECS
-
 //  QuickTime MOV file parser by A'rpi
 //  additional work by Atmos
 //  based on TOOLS/movinfo.c by A'rpi & Al3x
--- a/libmpdemux/demux_rawaudio.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libmpdemux/demux_rawaudio.c	Sat Dec 14 17:56:35 2002 +0000
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 
 #include "../cfgparser.h"
 
--- a/libvo/sub.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/libvo/sub.c	Sat Dec 14 17:56:35 2002 +0000
@@ -336,9 +336,10 @@
 		 if (sub_utf8){
 		    if ((c & 0xe0) == 0xc0)    /* 2 bytes U+00080..U+0007FF*/
 		       c = (c & 0x1f)<<6 | (t[++j] & 0x3f);
-		    else if((c & 0xf0) == 0xe0)/* 3 bytes U+00800..U+00FFFF*/
-		       c = ((c & 0x0f)<<6 |
-			    (t[++j] & 0x3f))<<6 | (t[++j] & 0x3f);
+		    else if((c & 0xf0) == 0xe0){ /* 3 bytes U+00800..U+00FFFF*/
+		       c = (((c & 0x0f)<<6) | (t[++j] & 0x3f))<<6;
+		       c |= (t[++j] & 0x3f);
+		    }
 		 } else if (sub_unicode) 
 		       c = (c<<8) + t[++j]; 
 	      }
--- a/loader/dmo/DMO_AudioDecoder.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/dmo/DMO_AudioDecoder.c	Sat Dec 14 17:56:35 2002 +0000
@@ -10,6 +10,7 @@
 #include "except.h"
 #else
 #include "libwin32.h"
+#include "ldt_keeper.h"
 #endif
 
 #include "DMO_Filter.h"
@@ -33,6 +34,7 @@
 #define __MODULE__ "DirectShow audio decoder"
 
 typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
+extern void print_wave_header(WAVEFORMATEX *h);
 
 DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels)
 //DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf)
@@ -83,8 +85,8 @@
     this->m_sDestType.cbFormat=18; //pWF->cbSize;
     this->m_sDestType.pbFormat=this->m_sVhdr2;
 
-print_wave_header(this->m_sVhdr);
-print_wave_header(this->m_sVhdr2);
+print_wave_header((WAVEFORMATEX *)this->m_sVhdr);
+print_wave_header((WAVEFORMATEX *)this->m_sVhdr2);
 
         this->m_pDMO_Filter = DMO_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
 	if( !this->m_pDMO_Filter ) {
@@ -109,8 +111,8 @@
 {
     DMO_OUTPUT_DATA_BUFFER db;
     CMediaBuffer* bufferin;
-    unsigned int written = 0;
-    unsigned int read = 0;
+    unsigned long written = 0;
+    unsigned long read = 0;
     int r = 0;
 
     if (!in_data || !out_data)
--- a/loader/dmo/DMO_VideoDecoder.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/dmo/DMO_VideoDecoder.c	Sat Dec 14 17:56:35 2002 +0000
@@ -8,6 +8,7 @@
 #include "guids.h"
 #include "interfaces.h"
 #include "registry.h"
+#include "../ldt_keeper.h"
 
 #ifndef NOAVIFILE_HEADERS
 #include "videodecoder.h"
@@ -234,7 +235,7 @@
 		if (!result)
 		{
 		    this->m_Caps = (this->m_Caps | c->cap);
-		    printf("%.4s ", &c->fcc);
+		    printf("%.4s ", (char*) &c->fcc);
 		}
 	    }
 	    printf("\n");
--- a/loader/driver.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/driver.c	Sat Dec 14 17:56:35 2002 +0000
@@ -17,6 +17,7 @@
 #include "registry.h"
 #include "ldt_keeper.h"
 #include "driver.h"
+#include "ext.h"
 
 extern char* def_path;
 
--- a/loader/dshow/DS_AudioDecoder.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/dshow/DS_AudioDecoder.c	Sat Dec 14 17:56:35 2002 +0000
@@ -24,6 +24,7 @@
 };
 
 #include "DS_AudioDecoder.h"
+#include "../ldt_keeper.h"
 
 #include <string.h>
 #include <stdio.h>
--- a/loader/dshow/DS_VideoDecoder.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/dshow/DS_VideoDecoder.c	Sat Dec 14 17:56:35 2002 +0000
@@ -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");
--- a/loader/module.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/module.c	Sat Dec 14 17:56:35 2002 +0000
@@ -430,10 +430,10 @@
 
 //	    dispatch_addr = GetProcAddress(wm->module, "theQuickTimeDispatcher", TRUE);
 	    dispatch_addr = PE_FindExportedFunction(wm, "theQuickTimeDispatcher", TRUE);
-	    if (dispatch_addr == 0x62924c30)
+	    if (dispatch_addr == (void *)0x62924c30)
 	    {
 	        fprintf(stderr, "QuickTime5 DLLs found\n");
-		ptr = 0x62b75ca4; // dispatch_ptr
+		ptr = (void **)0x62b75ca4; // dispatch_ptr
 	        for (i=0;i<5;i++)  ((char*)0x6299e842)[i]=0x90; // make_new_region ?
 	        for (i=0;i<28;i++) ((char*)0x6299e86d)[i]=0x90; // call__call_CreateCompatibleDC ?
 		for (i=0;i<5;i++)  ((char*)0x6299e898)[i]=0x90; // jmp_to_call_loadbitmap ?
@@ -458,10 +458,10 @@
 		((char *)0x6288e0ae)[0] = 0xc3; // font/dc remover
 		for (i=0;i<24;i++) ((char*)0x6287a1ad)[i]=0x90; // destroy window
 #endif
-	    } else if (dispatch_addr == 0x6693b330)
+	    } else if (dispatch_addr == (void *)0x6693b330)
 	    {
     		fprintf(stderr, "QuickTime6 DLLs found\n");
-		ptr = 0x66bb9524; // dispatcher_ptr
+		ptr = (void **)0x66bb9524; // dispatcher_ptr
 		for (i=0;i<5;i++)  ((char *)0x66a730cc)[i]=0x90; // make_new_region
 		for (i=0;i<28;i++) ((char *)0x66a730f7)[i]=0x90; // call__call_CreateCompatibleDC
 		for (i=0;i<5;i++)  ((char *)0x66a73122)[i]=0x90; // jmp_to_call_loadbitmap
@@ -469,9 +469,9 @@
 		for (i=0;i<96;i++) ((char *)0x66aac852)[i]=0x90; // disable threads
 	    } else
 	    {
-	        fprintf(stderr, "Unsupported QuickTime version (0x%x)\n",
+	        fprintf(stderr, "Unsupported QuickTime version (%p)\n",
 		    dispatch_addr);
-		return NULL;
+		return 0;
 	    }
 
 	    fprintf(stderr,"QuickTime.qts patched!!! old entry=%p\n",ptr[0]);
@@ -724,15 +724,15 @@
   // memory management:
   case 0x150011: //NewPtrClear
   case 0x150012: //NewPtrSysClear
-      reg->eax=malloc(((u_int32_t *)stack_base)[1]);
-      memset(reg->eax,0,((u_int32_t *)stack_base)[1]);
+      reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
+      memset((void *)reg->eax,0,((u_int32_t *)stack_base)[1]);
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
 #endif
       return 1;
   case 0x15000F: //NewPtr
   case 0x150010: //NewPtrSys
-      reg->eax=malloc(((u_int32_t *)stack_base)[1]);
+      reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
 #endif
@@ -741,7 +741,7 @@
       if(((u_int32_t *)stack_base)[1]>=0x60000000)
           printf("WARNING! Invalid Ptr handle!\n");
       else
-          free(((u_int32_t *)stack_base)[1]);
+          free((void *)((u_int32_t *)stack_base)[1]);
       reg->eax=0;
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
@@ -956,7 +956,7 @@
       report_entry = report_func;
       report_ret   = report_func_ret;
       wrapper_target=retproc;
-      retproc=wrapper;
+      retproc=(FARPROC)wrapper;
     }
 
     }
--- a/loader/win32.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/loader/win32.c	Sat Dec 14 17:56:35 2002 +0000
@@ -40,6 +40,7 @@
 #include "registry.h"
 #include "loader.h"
 #include "com.h"
+#include "ext.h"
 
 #include <stdlib.h>
 #include <assert.h>
@@ -820,7 +821,7 @@
 {
     int i;
     void *object;
-    int ret;
+    void *ret;
 
     dbgprintf("WaitForMultipleObjects(%d, 0x%x, %d, duration %d) =>\n",
 	count, objects, WaitAll, duration);
@@ -846,7 +847,7 @@
 static HANDLE WINAPI expCreateMutexA(void *pSecAttr,
 		    char bInitialOwner, const char *name)
 {
-    HANDLE mlist = expCreateEventA(pSecAttr, 0, 0, name);
+    HANDLE mlist = (HANDLE)expCreateEventA(pSecAttr, 0, 0, name);
     
     if (name)
 	dbgprintf("CreateMutexA(0x%x, %d, '%s') => 0x%x\n",
@@ -1376,6 +1377,9 @@
     pthread_mutex_unlock(&(cs->mutex));
     return;
 }
+
+static void expfree(void* mem); /* forward declaration */
+
 static void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c)
 {
 #ifdef CRITSECS_NEWTYPE
@@ -2492,7 +2496,7 @@
 
     if (lpmi->cbSize == sizeof(MONITORINFOEX))
     {
-	LPMONITORINFOEX lpmiex = lpmi;
+	LPMONITORINFOEX lpmiex = (LPMONITORINFOEX)lpmi;
 	dbgprintf("MONITORINFOEX!\n");
 	strncpy(lpmiex->szDevice, "Monitor1", CCHDEVICENAME);
     }
@@ -3529,9 +3533,9 @@
 #endif
 #else
     if (strrchr(lpFileName, '\\'))
-	*lpFilePart = strrchr(lpFileName, '\\');
+	lpFilePart = strrchr(lpFileName, '\\');
     else
-	*lpFilePart = lpFileName;
+	lpFilePart = lpFileName;
 #endif
     strcpy(lpBuffer, lpFileName);
 //    strncpy(lpBuffer, lpFileName, rindex(lpFileName, '\\')-lpFileName);
@@ -4403,7 +4407,7 @@
 
 static void WINAPI expExitProcess( DWORD status )
 {
-    printf("EXIT - code %d\n",status);
+    printf("EXIT - code %ld\n",status);
     exit(status);
 }
 
@@ -4462,7 +4466,7 @@
 static int expDirectDrawCreate(void)
 {
     dbgprintf("DirectDrawCreate(...) => NULL\n");
-    return NULL;
+    return 0;
 }
 
 #if 1
@@ -4488,8 +4492,8 @@
     dbgprintf("CreatePalette(%x) => NULL\n", lpgpl);
 
     i = sizeof(LOGPALETTE)+((lpgpl->palNumEntries-1)*sizeof(PALETTEENTRY));
-    test = malloc(i);
-    memcpy(test, lpgpl, i);
+    test = (HPALETTE)malloc(i);
+    memcpy((void *)test, lpgpl, i);
 
     return test;
 }
--- a/mencoder.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/mencoder.c	Sat Dec 14 17:56:35 2002 +0000
@@ -1281,7 +1281,7 @@
         
         end_at_type = END_AT_SIZE;
 
-        if(sscanf(param, "%d%3s", &end_at, unit) == 2) {
+        if(sscanf(param, "%lf%3s", &end_at, unit) == 2) {
             if(!strcasecmp(unit, "b"))
                 ;
             else if(!strcasecmp(unit, "kb"))
--- a/subreader.h	Sat Dec 14 17:12:40 2002 +0000
+++ b/subreader.h	Sat Dec 14 17:56:35 2002 +0000
@@ -43,6 +43,8 @@
 void dump_srt(subtitle* subs, float fps);
 void dump_mpsub(subtitle* subs, float fps);
 void dump_microdvd(subtitle* subs, float fps);
+void dump_jacosub(subtitle* subs, float fps);
+void dump_sami(subtitle* subs, float fps);
 void sub_free( subtitle * subs );
 void find_sub(subtitle* subtitles,int key);
 void step_sub(subtitle *subtitles, float pts, int movement);
--- a/unrarlib.c	Sat Dec 14 17:12:40 2002 +0000
+++ b/unrarlib.c	Sat Dec 14 17:56:35 2002 +0000
@@ -1676,7 +1676,10 @@
       UnpReadBuf(0);
     DecodeNumber((struct Decode *)&BD);
     if (Number<16)
-      Table[I++]=(Number+UnpOldTable[I]) & 0xf;
+    {
+      Table[I]=(Number+UnpOldTable[I]) & 0xf;
+      I++;
+    }
     else
       if (Number==16)
       {