Skip to content

Commit

Permalink
Another shot at fixing the compiler warnings under Cygwin/MingW.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 11, 2011
1 parent f800369 commit 9b50a5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions include/SDL_thread.h
Expand Up @@ -68,11 +68,6 @@ typedef struct SDL_Thread SDL_Thread;
#ifdef __OS2__
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
typedef void (*pfnSDL_CurrentEndThread)(void);
#elif __GNUC__
typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
unsigned (__stdcall *func)(void *), void *arg,
unsigned, unsigned *threadID);
typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
#else
typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
unsigned (__stdcall *func)(void *), void *arg,
Expand Down
9 changes: 2 additions & 7 deletions src/thread/win32/SDL_systhread.c
Expand Up @@ -36,12 +36,7 @@
#include <process.h>
#endif

#if __GNUC__
typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
unsigned (__stdcall *func)(void *), void *arg,
unsigned, unsigned *threadID);
typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
#elif defined(__WATCOMC__)
#if defined(__WATCOMC__)
/* This is for Watcom targets except OS2 */
#if __WATCOMC__ < 1240
#define __watcall
Expand All @@ -65,7 +60,7 @@ typedef struct ThreadStartParms
pfnSDL_CurrentEndThread pfnCurrentEndThread;
} tThreadStartParms, *pThreadStartParms;

static unsigned __stdcall RunThread(void *data)
static DWORD WINAPI RunThread(LPVOID data)
{
pThreadStartParms pThreadParms = (pThreadStartParms)data;
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
Expand Down
3 changes: 2 additions & 1 deletion src/video/wincommon/SDL_sysevents.c
Expand Up @@ -820,7 +820,8 @@ static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const BYTE *keystate,
{
BYTE chars[2];

if (ToAsciiEx(vkey, scancode, keystate, (WORD*)chars, 0, GetKeyboardLayout(0)) == 1) {
/* arg #3 should be const BYTE *, but cygwin lists it as PBYTE. */
if (ToAsciiEx(vkey, scancode, (PBYTE) keystate, (WORD*)chars, 0, GetKeyboardLayout(0)) == 1) {
return MultiByteToWideChar(codepage, 0, chars, 1, wchars, wsize);
}
return 0;
Expand Down

0 comments on commit 9b50a5d

Please sign in to comment.