summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-14 17:56:35 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-14 17:56:35 +0000
commitb987127e0e7eb90d8a0a618035a377e92f098447 (patch)
tree93886db1483e2ad6c3901f6646638e6da6079afa /loader
parentbbeb54d80aa6d1d6945ce3b6461b7d24c57841e9 (diff)
downloadmpv-b987127e0e7eb90d8a0a618035a377e92f098447.tar.bz2
mpv-b987127e0e7eb90d8a0a618035a377e92f098447.tar.xz
compiler warning fixes
based on patch by Dominik Mierzejewski <dominik@rangers.eu.org> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8452 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/dmo/DMO_AudioDecoder.c10
-rw-r--r--loader/dmo/DMO_VideoDecoder.c3
-rw-r--r--loader/driver.c1
-rw-r--r--loader/dshow/DS_AudioDecoder.c1
-rw-r--r--loader/dshow/DS_VideoDecoder.c5
-rw-r--r--loader/module.c22
-rw-r--r--loader/win32.c22
7 files changed, 37 insertions, 27 deletions
diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c
index f5c9a93b80..647fd8b912 100644
--- a/loader/dmo/DMO_AudioDecoder.c
+++ b/loader/dmo/DMO_AudioDecoder.c
@@ -10,6 +10,7 @@
#include "except.h"
#else
#include "libwin32.h"
+#include "ldt_keeper.h"
#endif
#include "DMO_Filter.h"
@@ -33,6 +34,7 @@ struct _DMO_AudioDecoder
#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 @@ DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX
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 @@ int DMO_AudioDecoder_Convert(DMO_AudioDecoder *this, const void* in_data, unsign
{
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)
diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c
index f62a0fab74..34cb54b7c8 100644
--- a/loader/dmo/DMO_VideoDecoder.c
+++ b/loader/dmo/DMO_VideoDecoder.c
@@ -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 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
if (!result)
{
this->m_Caps = (this->m_Caps | c->cap);
- printf("%.4s ", &c->fcc);
+ printf("%.4s ", (char*) &c->fcc);
}
}
printf("\n");
diff --git a/loader/driver.c b/loader/driver.c
index b33942a7a8..7f41288b2f 100644
--- a/loader/driver.c
+++ b/loader/driver.c
@@ -17,6 +17,7 @@
#include "registry.h"
#include "ldt_keeper.h"
#include "driver.h"
+#include "ext.h"
extern char* def_path;
diff --git a/loader/dshow/DS_AudioDecoder.c b/loader/dshow/DS_AudioDecoder.c
index 01a95e8fa4..d38dcdd52b 100644
--- a/loader/dshow/DS_AudioDecoder.c
+++ b/loader/dshow/DS_AudioDecoder.c
@@ -24,6 +24,7 @@ struct _DS_AudioDecoder
};
#include "DS_AudioDecoder.h"
+#include "../ldt_keeper.h"
#include <string.h>
#include <stdio.h>
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index bc0b7b27ba..ef3b77f33d 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -35,6 +35,7 @@ struct _DS_VideoDecoder
#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 @@ typedef struct _ct ct;
struct _ct {
unsigned int bits;
fourcc_t fcc;
- GUID *subtype;
+ const GUID *subtype;
int cap;
};
@@ -224,7 +225,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
if (!result)
{
this->m_Caps = (this->m_Caps | c->cap);
- printf("%.4s ", &c->fcc);
+ printf("%.4s ", (char *)&c->fcc);
}
}
printf("\n");
diff --git a/loader/module.c b/loader/module.c
index ea1999fd3a..f5bc28874c 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -430,10 +430,10 @@ 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 == 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 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
((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 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
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 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_
// 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 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_
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 @@ FARPROC MODULE_GetProcAddress(
report_entry = report_func;
report_ret = report_func_ret;
wrapper_target=retproc;
- retproc=wrapper;
+ retproc=(FARPROC)wrapper;
}
}
diff --git a/loader/win32.c b/loader/win32.c
index a05e65464d..6a637c8cf0 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -40,6 +40,7 @@ for DLL to know too much about its environment.
#include "registry.h"
#include "loader.h"
#include "com.h"
+#include "ext.h"
#include <stdlib.h>
#include <assert.h>
@@ -820,7 +821,7 @@ static void* WINAPI expWaitForMultipleObjects(int count, const void** objects,
{
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 void WINAPI expExitThread(int retcode)
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 @@ static void WINAPI expLeaveCriticalSection(CRITICAL_SECTION* c)
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 @@ static int WINAPI expGetMonitorInfoA(void *mon, LPMONITORINFO lpmi)
if (lpmi->cbSize == sizeof(MONITORINFOEX))
{
- LPMONITORINFOEX lpmiex = lpmi;
+ LPMONITORINFOEX lpmiex = (LPMONITORINFOEX)lpmi;
dbgprintf("MONITORINFOEX!\n");
strncpy(lpmiex->szDevice, "Monitor1", CCHDEVICENAME);
}
@@ -3529,9 +3533,9 @@ static DWORD WINAPI expGetFullPathNameA
#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 WIN_BOOL WINAPI expSetThreadPriority(
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 expSysStringByteLen(void *str)
static int expDirectDrawCreate(void)
{
dbgprintf("DirectDrawCreate(...) => NULL\n");
- return NULL;
+ return 0;
}
#if 1
@@ -4488,8 +4492,8 @@ static HPALETTE WINAPI expCreatePalette(CONST LOGPALETTE *lpgpl)
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;
}