diff options
author | rpj <rpj> | 2005-03-08 07:36:56 +0000 |
---|---|---|
committer | rpj <rpj> | 2005-03-08 07:36:56 +0000 |
commit | d5c78e3656cbc7410f333bfa80e2929947e6d0e5 (patch) | |
tree | 9d47c7f9dc5022564a7c34ec1db8cca4e4d6d802 /tests/mutex5.c | |
parent | 6df0e45cf47b5eaee00f21a5862e8f0c5107a4e2 (diff) |
compiler compatibility and bug fixes
Diffstat (limited to 'tests/mutex5.c')
-rw-r--r-- | tests/mutex5.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/tests/mutex5.c b/tests/mutex5.c index 10e224b..a597892 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -45,23 +45,19 @@ int main() { int mxType = -1; - int success = 0; /* Use to quell GNU compiler warnings. */ - assert(success = PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL); - assert(success = PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_ERRORCHECK); - assert(success = PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_RECURSIVE); - assert(success = PTHREAD_MUTEX_RECURSIVE != PTHREAD_MUTEX_ERRORCHECK); + 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(success = PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_FAST_NP); - assert(success = PTHREAD_MUTEX_RECURSIVE == PTHREAD_MUTEX_RECURSIVE_NP); - assert(success = PTHREAD_MUTEX_ERRORCHECK == PTHREAD_MUTEX_ERRORCHECK_NP); + assert(PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_FAST_NP); + assert(PTHREAD_MUTEX_RECURSIVE == PTHREAD_MUTEX_RECURSIVE_NP); + assert(PTHREAD_MUTEX_ERRORCHECK == PTHREAD_MUTEX_ERRORCHECK_NP); - if (success == success) - { - assert(pthread_mutexattr_init(&mxAttr) == 0); - assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0); - assert(mxType == PTHREAD_MUTEX_NORMAL); - } + assert(pthread_mutexattr_init(&mxAttr) == 0); + assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0); + assert(mxType == PTHREAD_MUTEX_NORMAL); return 0; } |