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.
* 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];
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);
{
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);