summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--command.c2
-rw-r--r--libao2/ao_dsound.c6
-rw-r--r--libmpcodecs/ad_qtaudio.c3
-rw-r--r--libmpcodecs/ad_twin.c4
-rw-r--r--libmpcodecs/vd_qtvideo.c2
-rw-r--r--libmpcodecs/vd_vfw.c4
-rw-r--r--libmpdemux/aviheader.h2
-rw-r--r--libvo/vo_directx.c6
-rw-r--r--libvo/w32_common.c14
-rw-r--r--loader/afl.c2
-rw-r--r--loader/dmo/DMO_VideoDecoder.c5
-rw-r--r--loader/dshow/DS_Filter.c4
-rw-r--r--loader/dshow/DS_VideoDecoder.c4
-rw-r--r--loader/dshow/allocator.c2
-rw-r--r--loader/dshow/graph.c32
-rw-r--r--loader/dshow/graph.h19
-rw-r--r--loader/dshow/outputpin.c6
-rw-r--r--loader/ext.c7
-rw-r--r--loader/module.c22
-rw-r--r--loader/pe_image.c14
-rw-r--r--loader/registry.c3
-rw-r--r--loader/win32.c18
-rw-r--r--loader/wine/winbase.h4
-rw-r--r--loader/wine/windef.h12
-rw-r--r--osdep/getch2-win.c4
-rw-r--r--osdep/setenv.c2
-rw-r--r--stream/cache2.c2
-rw-r--r--sub/vobsub.c4
28 files changed, 101 insertions, 108 deletions
diff --git a/command.c b/command.c
index 58dd68454f..5551da715c 100644
--- a/command.c
+++ b/command.c
@@ -1579,7 +1579,7 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg,
{
struct MPOpts *opts = &mpctx->opts;
demux_stream_t *const d_sub = mpctx->d_sub;
- int source = -1, reset_spu = 0;
+ int source = -1, reset_spu av_unused = 0; // used under CONFIG_DVDREAD
int source_pos = -1;
update_global_sub_size(mpctx);
diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c
index 605b0f16e0..63cc02e92c 100644
--- a/libao2/ao_dsound.c
+++ b/libao2/ao_dsound.c
@@ -81,12 +81,14 @@ static const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x1,0x0000,0x0010, {0x80,0x00,0x00
#define SPEAKER_TOP_BACK_RIGHT 0x20000
#define SPEAKER_RESERVED 0x80000000
+#if 0
#define DSSPEAKER_HEADPHONE 0x00000001
#define DSSPEAKER_MONO 0x00000002
#define DSSPEAKER_QUAD 0x00000003
#define DSSPEAKER_STEREO 0x00000004
#define DSSPEAKER_SURROUND 0x00000005
#define DSSPEAKER_5POINT1 0x00000006
+#endif
#ifndef _WAVEFORMATEXTENSIBLE_
typedef struct {
@@ -337,14 +339,14 @@ static int write_buffer(unsigned char *data, int len)
numsamp = dwBytes1 / (ao_data.channels * sampsize); // number of samples for each channel in this buffer
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ memcpy((char*)lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
if (NULL != lpvPtr2 )
{
numsamp = dwBytes2 / (ao_data.channels * sampsize);
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ memcpy((char*)lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
}
diff --git a/libmpcodecs/ad_qtaudio.c b/libmpcodecs/ad_qtaudio.c
index b6c7ef6299..1edd87cd17 100644
--- a/libmpcodecs/ad_qtaudio.c
+++ b/libmpcodecs/ad_qtaudio.c
@@ -300,7 +300,6 @@ static void uninit(sh_audio_t *sh){
}
static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){
- int error;
unsigned long FramesToGet=0; //how many frames the demuxer has to get
unsigned long InputBufferSize=0; //size of the input buffer
unsigned long ConvertedFrames=0;
@@ -331,7 +330,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
// printf("\nSoundConverterConvertBuffer(myConv=%p,inbuf=%p,frames=%d,outbuf=%p,&convframes=%p,&convbytes=%p)\n",
// myConverter,sh->a_in_buffer,FramesToGet,buf,&ConvertedFrames,&ConvertedBytes);
- error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer,
+ SoundConverterConvertBuffer(myConverter,sh->a_in_buffer,
FramesToGet,buf,&ConvertedFrames,&ConvertedBytes);
// printf("SoundConverterConvertBuffer:%i\n",error);
// printf("ConvertedFrames = %li\n",ConvertedFrames);
diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c
index 954ca17809..9aa304e4fc 100644
--- a/libmpcodecs/ad_twin.c
+++ b/libmpcodecs/ad_twin.c
@@ -54,8 +54,8 @@ static void (*TvqUpdateVectorInfo)(int varbits, int *ndiv, int bits0[], int bits
static int (*TvqCheckVersion)(char *versionID);
static void (*TvqGetConfInfo)(tvqConfInfo *cf);
-static int (*TvqGetFrameSize)();
-static int (*TvqGetNumFixedBitsPerFrame)();
+static int (*TvqGetFrameSize)(void);
+static int (*TvqGetNumFixedBitsPerFrame)(void);
#define BYTE_BIT 8
#define BBUFSIZ 1024 /* Bit buffer size (bytes) */
diff --git a/libmpcodecs/vd_qtvideo.c b/libmpcodecs/vd_qtvideo.c
index d3dbeacc45..5e37ca456e 100644
--- a/libmpcodecs/vd_qtvideo.c
+++ b/libmpcodecs/vd_qtvideo.c
@@ -129,7 +129,7 @@ static int init(sh_video_t *sh){
DecompressSequenceFrameS = (OSErr (*)(ImageSequence,Ptr,long,CodecFlags,CodecFlags*,ICMCompletionProcRecordPtr))GetProcAddress(handler, "DecompressSequenceFrameS");
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");
+ NewHandleClear = (Handle(*)(Size))GetProcAddress(handler, "NewHandleClear");
DisposeHandle = (void (*)(Handle))GetProcAddress(handler, "DisposeHandle");
DisposeGWorld = (void (*)(GWorldPtr))GetProcAddress(handler, "DisposeGWorld");
CDSequenceEnd = (OSErr (*)(ImageSequence))GetProcAddress(handler, "CDSequenceEnd");
diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c
index 55cc1642f0..331755a2b1 100644
--- a/libmpcodecs/vd_vfw.c
+++ b/libmpcodecs/vd_vfw.c
@@ -153,7 +153,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
static int init(sh_video_t *sh){
HRESULT ret;
// unsigned int outfmt=sh->codec->outfmt[sh->outfmtidx];
- int i, o_bih_len;
+ int o_bih_len;
vd_vfw_ctx *priv;
/* Hack for VSSH codec: new dll can't decode old files
@@ -198,7 +198,7 @@ static int init(sh_video_t *sh){
ret = ICDecompressGetFormat(priv->handle, sh->bih, priv->o_bih);
if(ret < 0){
mp_msg(MSGT_WIN32,MSGL_ERR,"ICDecompressGetFormat failed: Error %d\n", (int)ret);
- for (i=0; i < o_bih_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", priv->o_bih[i]);
+ //for (i=0; i < o_bih_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", priv->o_bih[i]);
return 0;
}
mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetFormat OK\n");
diff --git a/libmpdemux/aviheader.h b/libmpdemux/aviheader.h
index 6c86378a4a..8d226606de 100644
--- a/libmpdemux/aviheader.h
+++ b/libmpdemux/aviheader.h
@@ -128,8 +128,10 @@ typedef struct {
#define AVIIF_NOTIME 0x00000100L // this frame doesn't take any time
#define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
+#ifndef FOURCC_RIFF
#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
+#endif
typedef struct
{
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 419c0f2b94..d504e23567 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -276,7 +276,7 @@ static uint32_t Directx_CreateOverlay(uint32_t imgfmt)
case DDERR_OUTOFVIDEOMEMORY:
{mp_msg(MSGT_VO, MSGL_ERR,"not enough video memory\n");break;}
default:
- mp_msg(MSGT_VO, MSGL_ERR,"create surface failed with 0x%x\n",ddrval);
+ mp_msg(MSGT_VO, MSGL_ERR,"create surface failed with 0x%xu\n",(unsigned)ddrval);
}
return 1;
}
@@ -588,7 +588,7 @@ static uint32_t Directx_ManageDisplay(void)
// we should try upping the destination size a bit, or
// perhaps shrinking the source size
mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>UpdateOverlay failed\n" );
- mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>Overlay:x1:%i,y1:%i,x2:%i,y2:%i,w:%i,h:%i\n",rd.left,rd.top,rd.right,rd.bottom,rd.right - rd.left,rd.bottom - rd.top );
+ mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>Overlay:x1:%li,y1:%li,x2:%li,y2:%li,w:%li,h:%li\n",rd.left,rd.top,rd.right,rd.bottom,rd.right - rd.left,rd.bottom - rd.top );
mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>");
switch (ddrval)
{
@@ -618,7 +618,7 @@ static uint32_t Directx_ManageDisplay(void)
break;
}
default:
- mp_msg(MSGT_VO, MSGL_ERR ," 0x%x\n",ddrval);
+ mp_msg(MSGT_VO, MSGL_ERR ," 0x%xu\n",(unsigned)ddrval);
}
/*ok we can't do anything about it -> hide overlay*/
if(ddrval != DD_OK)
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index a8a59d02c9..475327ce5c 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -41,6 +41,8 @@
#define MONITOR_DEFAULTTOPRIMARY 1
#endif
+#define WIN_ID_TO_HWND(x) ((HWND)(uint32_t)(x))
+
static const char classname[] = "MPlayer - The Movie Player";
int vo_vm = 0;
@@ -116,7 +118,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
break;
case WM_WINDOWPOSCHANGING:
if (vo_keepaspect && !vo_fs && WinID < 0) {
- WINDOWPOS *wpos = lParam;
+ WINDOWPOS *wpos = (WINDOWPOS*)lParam;
int xborder, yborder;
r.left = r.top = 0;
r.right = wpos->cx;
@@ -232,10 +234,10 @@ int vo_w32_check_events(void) {
vo_dx = p.x; vo_dy = p.y;
event_flags |= VO_EVENT_MOVE;
}
- res = GetClientRect(WinID, &r);
+ res = GetClientRect(WIN_ID_TO_HWND(WinID), &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight))
MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE);
- if (!IsWindow(WinID))
+ if (!IsWindow(WIN_ID_TO_HWND(WinID)))
// Window has probably been closed, e.g. due to program crash
mplayer_put_key(KEY_CLOSE_WIN);
}
@@ -514,11 +516,11 @@ int vo_w32_init(void) {
if (WinID >= 0)
{
RECT r;
- GetClientRect(WinID, &r);
+ GetClientRect(WIN_ID_TO_HWND(WinID), &r);
vo_dwidth = r.right; vo_dheight = r.bottom;
vo_window = CreateWindowEx(WS_EX_NOPARENTNOTIFY, classname, classname,
- WS_CHILD | WS_VISIBLE,
- 0, 0, vo_dwidth, vo_dheight, WinID, 0, hInstance, 0);
+ WS_CHILD | WS_VISIBLE, 0, 0, vo_dwidth, vo_dheight,
+ WIN_ID_TO_HWND(WinID), 0, hInstance, 0);
EnableWindow(vo_window, 0);
} else
vo_window = CreateWindowEx(0, classname, classname,
diff --git a/loader/afl.c b/loader/afl.c
index 337cbcd551..b29471cdce 100644
--- a/loader/afl.c
+++ b/loader/afl.c
@@ -227,7 +227,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
return MMSYSERR_ERROR;
}
- pad->pfnDriverProc = GetProcAddress(pad->hDrvr, "DriverProc");
+ pad->pfnDriverProc = (DRIVERPROC)GetProcAddress(pad->hDrvr, "DriverProc");
/* insert new pad at beg of list */
pad->pNextACMDriver = padid->pACMDriverList;
diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c
index db0cd4c995..dcc0affe2c 100644
--- a/loader/dmo/DMO_VideoDecoder.c
+++ b/loader/dmo/DMO_VideoDecoder.c
@@ -361,7 +361,7 @@ int DMO_VideoDecoder_DecodeInternal(DMO_VideoDecoder *this, const void* src, int
int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int csp)
{
HRESULT result;
- int should_test=1;
+ //int should_test=1;
Debug printf("DMO_VideoDecoder_SetDestFmt (%p, %d, %d)\n",this,bits,(int)csp);
@@ -467,7 +467,7 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
else
this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
-
+#if 0
switch(csp)
{
case fccYUY2:
@@ -499,6 +499,7 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
should_test=false;
break;
}
+#endif
#ifdef WIN32_LOADER
Setup_FS_Segment();
diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c
index 693d59c25f..88f881523a 100644
--- a/loader/dshow/DS_Filter.c
+++ b/loader/dshow/DS_Filter.c
@@ -216,7 +216,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
enum_pins->vt->Reset(enum_pins);
result = enum_pins->vt->Next(enum_pins, (ULONG)256, (IPin**)array, &fetched);
- enum_pins->vt->Release(enum_pins);
+ enum_pins->vt->Release((IUnknown*)enum_pins);
Debug printf("Pins enumeration returned %ld pins, error is %x\n", fetched, (int)result);
for (i = 0; i < fetched; i++)
@@ -306,7 +306,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
init++;
break;
}
- tempAll->vt->Release(tempAll);
+ tempAll->vt->Release((IUnknown*)tempAll);
if (!init)
{
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index 8af025b475..c8cc988b61 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -600,8 +600,8 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
}
if(this->m_pDS_Filter->m_pAll)
- this->m_pDS_Filter->m_pAll->vt->Release(this->m_pDS_Filter->m_pAll);
- this->m_pDS_Filter->m_pAll=MemAllocatorCreate();
+ this->m_pDS_Filter->m_pAll->vt->Release((IUnknown*)this->m_pDS_Filter->m_pAll);
+ this->m_pDS_Filter->m_pAll=(IMemAllocator*)MemAllocatorCreate();
if (!this->m_pDS_Filter->m_pAll)
{
printf("Call to MemAllocatorCreate failed\n");
diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c
index a90bd9d3d2..744debf968 100644
--- a/loader/dshow/allocator.c
+++ b/loader/dshow/allocator.c
@@ -114,6 +114,7 @@ static inline avm_list_t* avm_list_find(avm_list_t* head, void* member)
return NULL;
}
+#ifdef WIN32_LOADER
static long MemAllocator_CreateAllocator(GUID* clsid, const GUID* iid, void** ppv)
{
IUnknown* p;
@@ -130,6 +131,7 @@ static long MemAllocator_CreateAllocator(GUID* clsid, const GUID* iid, void** pp
return result;
}
+#endif
static HRESULT STDCALL MemAllocator_SetProperties(IMemAllocator * This,
/* [in] */ ALLOCATOR_PROPERTIES *pRequest,
diff --git a/loader/dshow/graph.c b/loader/dshow/graph.c
index 01bf6c7253..14517a627f 100644
--- a/loader/dshow/graph.c
+++ b/loader/dshow/graph.c
@@ -34,6 +34,7 @@
// Used for knowing when to register and unregister the class in COM.
static int GraphKeeper = 0;
+#ifdef WIN32_LOADER
static long FilterGraph_CreateGraph(GUID* clsid, const GUID* iid, void** ppv)
{
IUnknown* p;
@@ -50,6 +51,7 @@ static long FilterGraph_CreateGraph(GUID* clsid, const GUID* iid, void** ppv)
return result;
}
+#endif
static void FilterGraph_Destroy(FilterGraph* This)
{
@@ -62,56 +64,56 @@ static void FilterGraph_Destroy(FilterGraph* This)
free(This);
}
-HRESULT STDCALL FilterGraph_AddFilter(FilterGraph* This,
- IBaseFilter* pFilter,
- unsigned short* pName)
+static HRESULT STDCALL FilterGraph_AddFilter(IFilterGraph* This,
+ IBaseFilter* pFilter,
+ unsigned short* pName)
{
Debug printf("FilterGraph_AddFilter(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_RemoveFilter(FilterGraph* This, IBaseFilter* pFilter)
+static HRESULT STDCALL FilterGraph_RemoveFilter(IFilterGraph* This, IBaseFilter* pFilter)
{
Debug printf("FilterGraph_RemoveFilter(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_EnumFilters(FilterGraph* This, IEnumFilters** ppEnum)
+static HRESULT STDCALL FilterGraph_EnumFilters(IFilterGraph* This, IEnumFilters** ppEnum)
{
Debug printf("FilterGraph_EnumFilters(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_FindFilterByName(FilterGraph* This,
- unsigned short* pName,
- IBaseFilter** ppFilter)
+static HRESULT STDCALL FilterGraph_FindFilterByName(IFilterGraph* This,
+ unsigned short* pName,
+ IBaseFilter** ppFilter)
{
Debug printf("FilterGraph_FindFilterByName(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_ConnectDirect(FilterGraph* This,
- IPin* ppinOut,
- IPin* ppinIn,
- const AM_MEDIA_TYPE* pmt)
+static HRESULT STDCALL FilterGraph_ConnectDirect(IFilterGraph* This,
+ IPin* ppinOut,
+ IPin* ppinIn,
+ const AM_MEDIA_TYPE* pmt)
{
Debug printf("FilterGraph_ConnectDirect(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_Reconnect(FilterGraph* This, IPin* ppin)
+static HRESULT STDCALL FilterGraph_Reconnect(IFilterGraph* This, IPin* ppin)
{
Debug printf("FilterGraph_Reconnect(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_Disconnect(FilterGraph* This, IPin* ppin)
+static HRESULT STDCALL FilterGraph_Disconnect(IFilterGraph* This, IPin* ppin)
{
Debug printf("FilterGraph_Disconnect(%p) called\n", This);
return E_NOTIMPL;
}
-HRESULT STDCALL FilterGraph_SetDefaultSyncSource(FilterGraph* This)
+static HRESULT STDCALL FilterGraph_SetDefaultSyncSource(IFilterGraph* This)
{
Debug printf("FilterGraph_SetDefaultSyncSource(%p) called\n", This);
return E_NOTIMPL;
diff --git a/loader/dshow/graph.h b/loader/dshow/graph.h
index 2fa72b49b4..7667f5a39e 100644
--- a/loader/dshow/graph.h
+++ b/loader/dshow/graph.h
@@ -52,25 +52,6 @@ struct FilterGraph {
HRESULT STDCALL (*SetDefaultSyncSource)(FilterGraph* This);
};
-
-HRESULT STDCALL FilterGraph_AddFilter(FilterGraph* This,
- IBaseFilter* pFilter,
- unsigned short* pName);
-HRESULT STDCALL FilterGraph_RemoveFilter(FilterGraph* This,
- IBaseFilter* pFilter);
-HRESULT STDCALL FilterGraph_EnumFilters(FilterGraph* This,
- IEnumFilters** ppEnum);
-HRESULT STDCALL FilterGraph_FindFilterByName(FilterGraph* This,
- unsigned short* pName,
- IBaseFilter** ppFilter);
-HRESULT STDCALL FilterGraph_ConnectDirect(FilterGraph* This,
- IPin* ppinOut,
- IPin* ppinIn,
- const AM_MEDIA_TYPE* pmt);
-HRESULT STDCALL FilterGraph_Reconnect(FilterGraph* This, IPin* ppin);
-HRESULT STDCALL FilterGraph_Disconnect(FilterGraph* This, IPin* ppin);
-HRESULT STDCALL FilterGraph_SetDefaultSyncSource(FilterGraph* This);
-
FilterGraph* FilterGraphCreate(void);
#endif /* MPLAYER_GRAPH_H */
diff --git a/loader/dshow/outputpin.c b/loader/dshow/outputpin.c
index ad53303df5..a1baf80116 100644
--- a/loader/dshow/outputpin.c
+++ b/loader/dshow/outputpin.c
@@ -552,8 +552,8 @@ static HRESULT STDCALL COutputPin_NewSegment(IPin * This,
/* [in] */ REFERENCE_TIME tStop,
/* [in] */ double dRate)
{
- Debug printf("COutputPin_NewSegment(%Ld,%Ld,%f) called\n",
- tStart, tStop, dRate);
+ Debug printf("COutputPin_NewSegment(%d,%d,%f) called\n",
+ (int)tStart, (int)tStop, dRate);
return 0;
}
@@ -749,7 +749,7 @@ static HRESULT STDCALL COutputMemPin_ReceiveMultiple(IMemInputPin * This,
/* [in] */ long nSamples,
/* [out] */ long *nSamplesProcessed)
{
- HRESULT hr;
+ HRESULT hr = 0;
Debug printf("COutputMemPin_ReceiveMultiple(%p) %ld\n", This,nSamples);
for(*nSamplesProcessed=0; *nSamplesProcessed < nSamples; *nSamplesProcessed++) {
hr = This->vt->Receive(This,pSamples[*nSamplesProcessed]);
diff --git a/loader/ext.c b/loader/ext.c
index d91ab4a3de..feab985167 100644
--- a/loader/ext.c
+++ b/loader/ext.c
@@ -443,12 +443,12 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec
if (type&MEM_RESERVE && (unsigned)address&0xffff) {
size += (unsigned)address&0xffff;
- address = (unsigned)address&~0xffff;
+ address = (void*)((unsigned)address&~0xffff);
}
pgsz = sysconf(_SC_PAGESIZE);
if (type&MEM_COMMIT && (unsigned)address%pgsz) {
size += (unsigned)address%pgsz;
- address -= (unsigned)address%pgsz;
+ address = (void*)((unsigned)address - (unsigned)address%pgsz);
}
if (type&MEM_RESERVE && size<0x10000) size = 0x10000;
@@ -531,7 +531,6 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec
WIN_BOOL WINAPI VirtualFree(LPVOID address, SIZE_T dwSize, DWORD dwFreeType)//not sure
{
virt_alloc* str=vm;
- int answer;
//printf("VirtualFree(0x%08X, %d, 0x%08X)\n", (unsigned)address, dwSize, dwFreeType);
while(str)
@@ -542,7 +541,7 @@ WIN_BOOL WINAPI VirtualFree(LPVOID address, SIZE_T dwSize, DWORD dwFreeType)//n
continue;
}
//printf(" VirtualFree(...) munmap(0x%08X, %d)\n", (unsigned)str->address, str->mapping_size);
- answer=munmap(str->address, str->mapping_size);
+ munmap(str->address, str->mapping_size);
if(str->next)str->next->prev=str->prev;
if(str->prev)str->prev->next=str->next;
if(vm==str)vm=str->prev;
diff --git a/loader/module.c b/loader/module.c
index 78d46d5c15..aa921c52d6 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -440,7 +440,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
int i;
// sse hack moved from patch dll into runtime patching
- if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x1000)) {
+ if ((char*)PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x1000)) {
fprintf(stderr, "VP3 DLL found\n");
for (i=0;i<18;i++) RVA(0x4bd6)[i]=0x90;
}
@@ -450,7 +450,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
if (strstr(libname,"vp5vfw.dll") && wm)
{
int i;
- if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3930)) {
+ if ((char*)PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3930)) {
for (i=0;i<3;i++) RVA(0x4e86)[i]=0x90;
for (i=0;i<3;i++) RVA(0x5a23)[i]=0x90;
for (i=0;i<3;i++) RVA(0x5bff)[i]=0x90;
@@ -463,12 +463,12 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
if (strstr(libname,"vp6vfw.dll") && wm)
{
int i;
- if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3ef0)) {
+ if ((char*)PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3ef0)) {
// looks like VP 6.1.0.2
for (i=0;i<6;i++) RVA(0x7268)[i]=0x90;
for (i=0;i<6;i++) RVA(0x7e83)[i]=0x90;
for (i=0;i<6;i++) RVA(0x806a)[i]=0x90;
- } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x4120)) {
+ } else if ((char*)PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x4120)) {
// looks like VP 6.2.0.10
for (i=0;i<6;i++) RVA(0x7688)[i]=0x90;
for (i=0;i<6;i++) RVA(0x82c3)[i]=0x90;
@@ -476,7 +476,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
for (i=0;i<6;i++) RVA(0x1d2cc)[i]=0x90;
for (i=0;i<6;i++) RVA(0x2179d)[i]=0x90;
for (i=0;i<6;i++) RVA(0x1977f)[i]=0x90;
- } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3e70)) {
+ } else if ((char*)PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3e70)) {
// looks like VP 6.0.7.3
for (i=0;i<6;i++) RVA(0x7559)[i]=0x90;
for (i=0;i<6;i++) RVA(0x81c3)[i]=0x90;
@@ -492,7 +492,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
{
// The codec calls IsRectEmpty with coords 0,0,0,0 => result is 0
// but it really wants the rectangle to be not empty
- if (PE_FindExportedFunction(wm, "CreateInstance", TRUE)==RVA(0xb812)) {
+ if ((char*)PE_FindExportedFunction(wm, "CreateInstance", TRUE)==RVA(0xb812)) {
// Dll version is 10.0.0.3645
*RVA(0x8b0f)=0xeb; // Jump always, ignoring IsRectEmpty result
} else {
@@ -509,7 +509,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
// dispatch_addr = GetProcAddress(wm->module, "theQuickTimeDispatcher", TRUE);
dispatch_addr = PE_FindExportedFunction(wm, "theQuickTimeDispatcher", TRUE);
- if (dispatch_addr == RVA(0x124c30))
+ if ((char*)dispatch_addr == RVA(0x124c30))
{
fprintf(stderr, "QuickTime5 DLLs found\n");
ptr = (void **)RVA(0x375ca4); // dispatch_ptr
@@ -537,7 +537,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
RVA(0x08e0ae)[0] = 0xc3; // font/dc remover
for (i=0;i<24;i++) RVA(0x07a1ad)[i]=0x90; // destroy window
#endif
- } else if (dispatch_addr == RVA(0x13b330))
+ } else if ((char*)dispatch_addr == RVA(0x13b330))
{
fprintf(stderr, "QuickTime6 DLLs found\n");
ptr = (void **)RVA(0x3b9524); // dispatcher_ptr
@@ -546,7 +546,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
for (i=0;i<5;i++) RVA(0x273122)[i]=0x90; // jmp_to_call_loadbitmap
for (i=0;i<9;i++) RVA(0x273131)[i]=0x90; // call__calls_OLE_shit
for (i=0;i<96;i++) RVA(0x2ac852)[i]=0x90; // disable threads
- } else if (dispatch_addr == RVA(0x13c3e0))
+ } else if ((char*)dispatch_addr == RVA(0x13c3e0))
{
fprintf(stderr, "QuickTime6.3 DLLs found\n");
ptr = (void **)RVA(0x3ca01c); // dispatcher_ptr
@@ -825,7 +825,7 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t
// memory management:
case 0x150011: //NewPtrClear
case 0x150012: //NewPtrSysClear
- reg->eax = malloc(((uint32_t *)stack_base)[1]);
+ reg->eax = (uint32_t)malloc(((uint32_t *)stack_base)[1]);
memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
@@ -833,7 +833,7 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t
return 1;
case 0x15000F: //NewPtr
case 0x150010: //NewPtrSys
- reg->eax = malloc(((uint32_t *)stack_base)[1]);
+ reg->eax = (uint32_t)malloc(((uint32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
#endif
diff --git a/loader/pe_image.c b/loader/pe_image.c
index 85b56ab4f2..fed5780fb1 100644
--- a/loader/pe_image.c
+++ b/loader/pe_image.c
@@ -73,7 +73,7 @@ static void dump_exports( HMODULE hModule )
char *Module;
unsigned int i, j;
unsigned short *ordinal;
- unsigned long *function,*functions;
+ unsigned long *function;
unsigned char **name;
unsigned int load_addr = hModule;
@@ -84,14 +84,17 @@ static void dump_exports( HMODULE hModule )
IMAGE_EXPORT_DIRECTORY *pe_exports = (IMAGE_EXPORT_DIRECTORY*)RVA(rva_start);
Module = (char*)RVA(pe_exports->Name);
+ (void)Module; //silence compiler warning
TRACE("*******EXPORT DATA*******\n");
TRACE("Module name is %s, %ld functions, %ld names\n",
Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames);
ordinal=(unsigned short*) RVA(pe_exports->AddressOfNameOrdinals);
- functions=function=(unsigned long*) RVA(pe_exports->AddressOfFunctions);
+ function=(unsigned long*) RVA(pe_exports->AddressOfFunctions);
name=(unsigned char**) RVA(pe_exports->AddressOfNames);
+ (void)name; //silence compiler warning
+
TRACE(" Ord RVA Addr Name\n" );
for (i=0;i<pe_exports->NumberOfFunctions;i++, function++)
{
@@ -135,7 +138,6 @@ FARPROC PE_FindExportedFunction(
IMAGE_EXPORT_DIRECTORY *exports = pem->pe_export;
unsigned int load_addr = wm->module;
unsigned long rva_start, rva_end, addr;
- char * forward;
if (HIWORD(funcName))
TRACE("(%s)\n",funcName);
@@ -152,7 +154,6 @@ FARPROC PE_FindExportedFunction(
ordinals= (unsigned short*) RVA(exports->AddressOfNameOrdinals);
function= (unsigned long*) RVA(exports->AddressOfFunctions);
name = (unsigned char **) RVA(exports->AddressOfNames);
- forward = NULL;
rva_start = PE_HEADER(wm->module)->OptionalHeader
.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
rva_end = rva_start + PE_HEADER(wm->module)->OptionalHeader
@@ -247,14 +248,9 @@ static DWORD fixup_imports( WINE_MODREF *wm )
PE_MODREF *pem;
unsigned int load_addr = wm->module;
int i,characteristics_detection=1;
- char *modname;
assert(wm->type==MODULE32_PE);
pem = &(wm->binfmt.pe);
- if (pem->pe_export)
- modname = (char*) RVA(pem->pe_export->Name);
- else
- modname = "<unknown>";
TRACE("Dumping imports list\n");
diff --git a/loader/registry.c b/loader/registry.c
index 2eb449124c..b87c160e67 100644
--- a/loader/registry.c
+++ b/loader/registry.c
@@ -339,7 +339,6 @@ long __stdcall RegOpenKeyExA(long key, const char* subkey, long reserved, long a
{
char* full_name;
reg_handle_t* t;
- struct reg_value* v;
TRACE("Opening key %s\n", subkey);
if(!regs)
@@ -357,7 +356,7 @@ long __stdcall RegOpenKeyExA(long key, const char* subkey, long reserve