summaryrefslogtreecommitdiff
path: root/tests/once2.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-06 10:46:44 +0000
committerrpj <rpj>2011-03-06 10:46:44 +0000
commit1183e5acfa10c7bda1dc39034d6e2fa6dec6016f (patch)
treefd5220ed96e0fef2390b72ad170b62f0516242ce /tests/once2.c
parent85dfeaf6133e1b74eefed26cf76c3f8631c7dd1d (diff)
64 bit compatibility (mingw64)
Diffstat (limited to 'tests/once2.c')
-rw-r--r--tests/once2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/once2.c b/tests/once2.c
index 248ccb1..84e3f4b 100644
--- a/tests/once2.c
+++ b/tests/once2.c
@@ -70,11 +70,11 @@ myfunc(void)
void *
mythread(void * arg)
{
- assert(pthread_once(&once[(int) arg], myfunc) == 0);
+ assert(pthread_once(&once[(int)(size_t)arg], myfunc) == 0);
EnterCriticalSection(&numThreads.cs);
numThreads.i++;
LeaveCriticalSection(&numThreads.cs);
- return 0;
+ return (void*)(size_t)0;
}
int
@@ -91,7 +91,7 @@ main()
once[j] = o;
for (i = 0; i < NUM_THREADS; i++)
- assert(pthread_create(&t[i][j], NULL, mythread, (void *) j) == 0);
+ assert(pthread_create(&t[i][j], NULL, mythread, (void *)(size_t)j) == 0);
}
for (j = 0; j < NUM_ONCE; j++)