typo in _pthread_tryjoin() fixed & warn about "ISO C forbids conditional expr with only one void side" is suppressed
diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h b/mingw-w64-libraries/winpthreads/include/pthread.h index 9b8978c..07e5636 100644 --- a/mingw-w64-libraries/winpthreads/include/pthread.h +++ b/mingw-w64-libraries/winpthreads/include/pthread.h
@@ -212,7 +212,7 @@ /* Note that if async cancelling is used, then there is a race here */ #define pthread_cleanup_pop(E)\ - (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):0));} + (*pthread_getclean() = _pthread_cup.next, ((E) ? (_pthread_cup.func((pthread_once_t *)_pthread_cup.arg)) : (void)0));} /* Windows doesn't have this, so declare it ourselves. */ #ifndef _TIMESPEC_DEFINED
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c b/mingw-w64-libraries/winpthreads/src/thread.c index 565ea48..2d96f4b 100644 --- a/mingw-w64-libraries/winpthreads/src/thread.c +++ b/mingw-w64-libraries/winpthreads/src/thread.c
@@ -1691,12 +1691,12 @@ } if(tv->ended == 0 && WaitForSingleObject(tv->h, 0)) { - if (tv->ended == 0); + if (tv->ended == 0) { - pthread_mutex_unlock (&mtx_pthr_locked); - /* pthread_testcancel (); */ - return EBUSY; - } + pthread_mutex_unlock (&mtx_pthr_locked); + /* pthread_testcancel (); */ + return EBUSY; + } } CloseHandle (tv->h); if (tv->evStart)