summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-13 04:09:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-13 04:09:35 +0000
commit9341988b4141534586c24d60265d45292dc8d505 (patch)
tree1b244ece5a0655e739fe42b6ef06dede9890efb3 /thread_pthread.c
parent621153bf3fb229a746a74aa1d64ab24622f91268 (diff)
thread_pthread.c: suppress warning
* thread_pthread.c (get_stack): define guard only when it is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index f9fa97bf8c..721a011d5c 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -509,7 +509,9 @@ get_stack(void **addr, size_t *size)
{int err = (expr); if (err) return err;}
#if defined HAVE_PTHREAD_GETATTR_NP || defined HAVE_PTHREAD_ATTR_GET_NP
pthread_attr_t attr;
+# if defined HAVE_PTHREAD_ATTR_GET_NP /* HAVE_PTHREAD_ATTR_GETGUARDSIZE */
size_t guard = 0;
+# endif
# ifdef HAVE_PTHREAD_GETATTR_NP /* Linux */
STACK_GROW_DIR_DETECTION;