From 5561998d3f57b23914c5a8cc5a07e53492242a3e Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 11 Jun 2001 12:59:34 +0000 Subject: * semaphore.h (sem_t): Fixed for compile and test. * implement.h (sem_t_): Likewise. * semaphore.c: Likewise. * private.c (ptw32_sem_timedwait): Updated to use new opaque sem_t. tests/ * mutex5.c: Insert inert change to quell compiler warnings. * condvar3_2.c: Remove unused variable. --- tests/ChangeLog | 5 +++++ tests/condvar3_2.c | 1 - tests/mutex5.c | 24 ++++++++++++++---------- 3 files changed, 19 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index e7026f2..27f8dfe 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2001-06-8 Ross Johnson + + * mutex5.c: Insert inert change to quell compiler warnings. + * condvar3_2.c: Remove unused variable. + 2001-06-3 Ross Johnson * condvar2_1.c: New test. diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index cd1565d..e5f451b 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -51,7 +51,6 @@ static pthread_mutex_t mutex; static struct timespec abstime = { 0, 0 }; static struct timespec abstime2 = { 0, 0 }; static int timedout = 0; -static int signaled = 0; static int awoken = 0; enum { diff --git a/tests/mutex5.c b/tests/mutex5.c index 6a9a917..d7b9064 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -13,19 +13,23 @@ int main() { int mxType = -1; + int bool = 0; /* Use to quell GNU compiler warnings. */ - assert(PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL); - assert(PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_ERRORCHECK); - assert(PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_RECURSIVE); - assert(PTHREAD_MUTEX_RECURSIVE != PTHREAD_MUTEX_ERRORCHECK); + assert(bool = PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL); + assert(bool = PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_ERRORCHECK); + assert(bool = PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_RECURSIVE); + assert(bool = PTHREAD_MUTEX_RECURSIVE != PTHREAD_MUTEX_ERRORCHECK); - assert(PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_FAST_NP); - assert(PTHREAD_MUTEX_RECURSIVE == PTHREAD_MUTEX_RECURSIVE_NP); - assert(PTHREAD_MUTEX_ERRORCHECK == PTHREAD_MUTEX_ERRORCHECK_NP); + assert(bool = PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_FAST_NP); + assert(bool = PTHREAD_MUTEX_RECURSIVE == PTHREAD_MUTEX_RECURSIVE_NP); + assert(bool = PTHREAD_MUTEX_ERRORCHECK == PTHREAD_MUTEX_ERRORCHECK_NP); - assert(pthread_mutexattr_init(&mxAttr) == 0); - assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0); - assert(mxType == PTHREAD_MUTEX_NORMAL); + if (bool == bool) + { + assert(pthread_mutexattr_init(&mxAttr) == 0); + assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0); + assert(mxType == PTHREAD_MUTEX_NORMAL); + } return 0; } -- cgit v1.2.3