summaryrefslogtreecommitdiff
path: root/tests/rwlock6_t2.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-04 08:03:46 +0000
committerrpj <rpj>2011-03-04 08:03:46 +0000
commite1de8e3c33257b4e7d6b98767a67414efc31b6c7 (patch)
tree1942d5037d1cf5077c62f2dce89cf60cd9f96399 /tests/rwlock6_t2.c
parente470da85f7b9426eea03d66086c2822bf29e9b05 (diff)
Casting fixups
Diffstat (limited to 'tests/rwlock6_t2.c')
-rw-r--r--tests/rwlock6_t2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c
index 1bce439..0c7191f 100644
--- a/tests/rwlock6_t2.c
+++ b/tests/rwlock6_t2.c
@@ -54,7 +54,7 @@ void * wrfunc(void * arg)
int result;
result = pthread_rwlock_timedwrlock(&rwlock1, &abstime);
- if ((int) arg == 1)
+ if ((int) (size_t)arg == 1)
{
assert(result == 0);
Sleep(2000);
@@ -62,7 +62,7 @@ void * wrfunc(void * arg)
assert(pthread_rwlock_unlock(&rwlock1) == 0);
return ((void *) bankAccount);
}
- else if ((int) arg == 2)
+ else if ((int) (size_t)arg == 2)
{
assert(result == ETIMEDOUT);
return ((void *) 100);
@@ -94,7 +94,7 @@ main()
PTW32_FTIME(&currSysTime);
- abstime.tv_sec = currSysTime.time;
+ abstime.tv_sec = (long)currSysTime.time;
abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
abstime.tv_sec += 1;
@@ -107,9 +107,9 @@ main()
Sleep(100);
assert(pthread_create(&wrt2, NULL, wrfunc, (void *) 2) == 0);
- assert(pthread_join(wrt1, (void **) &wr1Result) == 0);
- assert(pthread_join(rdt, (void **) &rdResult) == 0);
- assert(pthread_join(wrt2, (void **) &wr2Result) == 0);
+ assert(pthread_join(wrt1, (void *) &wr1Result) == 0);
+ assert(pthread_join(rdt, (void *) &rdResult) == 0);
+ assert(pthread_join(wrt2, (void *) &wr2Result) == 0);
assert(wr1Result == 10);
assert(rdResult == 0);