diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-15 02:23:11 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-15 02:23:11 +0000 |
commit | 5dd55bddfedf047fb635b6ea9655e5a6f324e62e (patch) | |
tree | 4d1eb66fc3b48cea8e167c503fd63536f5c01550 | |
parent | d5a921c9a82ec826fd1d8f9505ebffbe3fdbd006 (diff) | |
download | gdb-5dd55bddfedf047fb635b6ea9655e5a6f324e62e.zip gdb-5dd55bddfedf047fb635b6ea9655e5a6f324e62e.tar.gz gdb-5dd55bddfedf047fb635b6ea9655e5a6f324e62e.tar.bz2 |
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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/schedlock.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cf15071..853ca8c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 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 attaching to nonexistent process. diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c index 033131c..13f9e75 100644 --- a/gdb/testsuite/gdb.threads/schedlock.c +++ b/gdb/testsuite/gdb.threads/schedlock.c @@ -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 :) */ |