2003-04-14 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Tue, 15 Apr 2003 02:23:11 +0000 (02:23 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Tue, 15 Apr 2003 02:23:11 +0000 (02:23 +0000)
* gdb.threads/schedlock.c: Change type of thread function argument
to long, to avoid warnings on 64-bit platforms.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/schedlock.c

index cf15071e40dd5e161c933fe17e7a8f23f968f9cb..853ca8ce000c568be513f04c09189887ab8b1de8 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-14  Elena Zannoni  <ezannoni@redhat.com>
+
+       * gdb.threads/schedlock.c: Change type of thread function argument
+       to long, to avoid warnings on 64-bit platforms.
+
 2003-04-14  Elena Zannoni  <ezannoni@redhat.com>
 
         * gdb.base/attach.exp: Add new message from ptrace in case of
index 033131c2a52d9662d687e1957701ef94c2e8b232..13f9e75d2df6623ae301cb2966951079dd835ac5 100644 (file)
@@ -13,12 +13,15 @@ int main() {
     int res;
     pthread_t threads[NUM];
     void *thread_result;
-    int i;
+    long i;
 
     for (i = 0; i < NUM; i++)
       {
        args[i] = 1;
-       res = pthread_create(&threads[i], NULL, thread_function, (void *)i);
+       res = pthread_create(&threads[i],
+                            NULL,
+                            thread_function,
+                            (void *) i);
       }
 
     /* schedlock.exp: last thread start.  */
@@ -29,7 +32,7 @@ int main() {
 }
 
 void *thread_function(void *arg) {
-    int my_number = (int) arg;
+    int my_number =  (long) arg;
     int *myp = &args[my_number];
 
     /* Don't run forever.  Run just short of it :)  */
This page took 0.032084 seconds and 4 git commands to generate.