From ec5a8b31ba1c193085d8c6befbe59bf81d015eea Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 26 Jun 2005 18:31:14 +0000 Subject: [PATCH] (loc_Sem_t, empth_sem_t) [_WIN32]: empthread.h defines empth_sem_t as incomplete type struct loc_Sem_t. Instead of completing it here, the code defined an unrelated type loc_Sem_t as (complete) type struct empth_sem_t. The resulting type errors were swept under the carpet with casts. Obvious fix. --- src/lib/empthread/ntthread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index c74758a7..a5158059 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -100,7 +100,7 @@ typedef struct loc_Thread_t { * The REAL empth_sem_t structure. * The external world only gets a void pointer to this. */ -typedef struct empth_sem_t { +typedef struct loc_Sem_t { char szName[17]; @@ -673,7 +673,7 @@ empth_sem_create(char *name, int cnt) void empth_sem_signal(empth_sem_t *sm) { - loc_Sem_t *pSem = (loc_Sem_t *)sm; + loc_Sem_t *pSem = sm; loc_debug("signal on semaphore %s:%d", pSem->szName, pSem->count); @@ -697,7 +697,7 @@ empth_sem_wait(empth_sem_t *sm) { loc_Thread_t *pThread = (loc_Thread_t *)TlsGetValue(loc_GVAR.dwTLSIndex); - loc_Sem_t *pSem = (loc_Sem_t *)sm; + loc_Sem_t *pSem = sm; loc_debug("wait on semaphore %s:%d", pSem->szName, pSem->count);