about summary refs log tree commit diff
path: root/linuxthreads/Examples/ex14.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/Examples/ex14.c')
-rw-r--r--linuxthreads/Examples/ex14.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxthreads/Examples/ex14.c b/linuxthreads/Examples/ex14.c
index 9d2c987347..7788e521b8 100644
--- a/linuxthreads/Examples/ex14.c
+++ b/linuxthreads/Examples/ex14.c
@@ -19,7 +19,7 @@ static void *
 worker (void *arg)
 {
   void *result = NULL;
-  int nr = (int) arg;
+  int nr = (long int) arg;
   int i;
 
   for (i = 0; i < ROUNDS; ++i)
@@ -110,7 +110,7 @@ do_test (void)
 
   /* Start the threads.  */
   for (i = 0; i < NTHREADS; ++i)
-    if (pthread_create (&threads[i], NULL, worker, (void *) i) != 0)
+    if (pthread_create (&threads[i], NULL, worker, (void *) (long int) i) != 0)
       {
 	printf ("Failed to start thread %d\n", i);
 	exit (1);