Fixed some compiler warnings on Cygwin.
--HG-- branch : SDL-1.2
This commit is contained in:
parent
a4163fc517
commit
b5187bc2c8
3 changed files with 9 additions and 8 deletions
|
@ -38,7 +38,7 @@ struct SDL_semaphore {
|
|||
#else
|
||||
HANDLE id;
|
||||
#endif
|
||||
Uint32 volatile count;
|
||||
volatile LONG count;
|
||||
};
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
|
|||
#else
|
||||
sem->id = CreateSemaphore(NULL, initial_value, 32*1024, NULL);
|
||||
#endif
|
||||
sem->count = initial_value;
|
||||
sem->count = (LONG) initial_value;
|
||||
if ( ! sem->id ) {
|
||||
SDL_SetError("Couldn't create semaphore");
|
||||
SDL_free(sem);
|
||||
|
@ -136,7 +136,7 @@ Uint32 SDL_SemValue(SDL_sem *sem)
|
|||
SDL_SetError("Passed a NULL sem");
|
||||
return 0;
|
||||
}
|
||||
return sem->count;
|
||||
return (Uint32) sem->count;
|
||||
}
|
||||
|
||||
int SDL_SemPost(SDL_sem *sem)
|
||||
|
|
|
@ -65,7 +65,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;
|
||||
|
@ -99,7 +99,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
|||
pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
|
||||
#endif
|
||||
#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
|
||||
unsigned threadid;
|
||||
DWORD threadid = 0;
|
||||
pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms));
|
||||
if (!pThreadParms) {
|
||||
SDL_OutOfMemory();
|
||||
|
@ -112,8 +112,9 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
|||
pThreadParms->args = args;
|
||||
|
||||
if (pfnBeginThread) {
|
||||
thread->handle = (SYS_ThreadHandle) pfnBeginThread(NULL, 0, RunThread,
|
||||
pThreadParms, 0, &threadid);
|
||||
thread->handle = (SYS_ThreadHandle)
|
||||
((size_t) pfnBeginThread(NULL, 0, RunThread,
|
||||
pThreadParms, 0, &threadid));
|
||||
} else {
|
||||
thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid);
|
||||
}
|
||||
|
|
|
@ -655,7 +655,7 @@ int DIB_CreateWindow(_THIS)
|
|||
SDL_Window = (HWND)wcstol(windowid_t, NULL, 0);
|
||||
SDL_free(windowid_t);
|
||||
#else
|
||||
SDL_Window = (HWND)SDL_strtoull(windowid, NULL, 0);
|
||||
SDL_Window = (HWND)((size_t)SDL_strtoull(windowid, NULL, 0));
|
||||
#endif
|
||||
if ( SDL_Window == NULL ) {
|
||||
SDL_SetError("Couldn't get user specified window");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue