diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-14 17:56:35 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-14 17:56:35 +0000 |
commit | b987127e0e7eb90d8a0a618035a377e92f098447 (patch) | |
tree | 93886db1483e2ad6c3901f6646638e6da6079afa /loader/win32.c | |
parent | bbeb54d80aa6d1d6945ce3b6461b7d24c57841e9 (diff) | |
download | mpv-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/win32.c')
-rw-r--r-- | loader/win32.c | 22 |
1 files changed, 13 insertions, 9 deletions
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; } |