From 42eabfcca25d988b764412e18c3dec5208864a7e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 17 Jun 2008 12:58:31 +0000 Subject: * thread_pthread.c (native_thread_init_stack): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/thread_pthread.c b/thread_pthread.c index 62ac28b808..bcab6acddb 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -229,13 +229,15 @@ native_thread_init_stack(rb_thread_t *th) else { #ifdef HAVE_PTHREAD_GETATTR_NP pthread_attr_t attr; + void *start; CHECK_ERR(pthread_getattr_np(curr, &attr)); # if defined HAVE_PTHREAD_ATTR_GETSTACK - CHECK_ERR(pthread_attr_getstack(&attr, &th->machine_stack_start, &th->machine_stack_maxsize)); + CHECK_ERR(pthread_attr_getstack(&attr, &start, &th->machine_stack_maxsize)); # elif defined HAVE_PTHREAD_ATTR_GETSTACKSIZE && defined HAVE_PTHREAD_ATTR_GETSTACKADDR - CHECK_ERR(pthread_attr_getstackaddr(&attr, &th->machine_stack_start)); + CHECK_ERR(pthread_attr_getstackaddr(&attr, &start)); CHECK_ERR(pthread_attr_getstacksize(&attr, &th->machine_stack_maxsize)); # endif + th->machine_stack_start = start; #else rb_raise(rb_eNotImpError, "ruby engine can initialize only in the main thread"); #endif -- cgit v1.2.3