summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 16:02:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 16:02:49 +0900
commit07b12a1f4829ca3c7d60d56bb5c89069f0758d4c (patch)
treeeae3eda66d304d5604af1fd28086e9612224025f /thread_pthread.c
parentee7bd7d7325d670c5bb204a63dc845465ca3f96a (diff)
Suppress unused-variable warnings
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4745
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 36c0b33e00..15a5ff826b 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -765,10 +765,10 @@ get_stack(void **addr, size_t *size)
# endif
# ifdef HAVE_PTHREAD_ATTR_GETGUARDSIZE
CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
- *size -= guard;
# else
- *size -= getpagesize();
+ guard = getpagesize();
# endif
+ *size -= guard;
pthread_attr_destroy(&attr);
#elif defined HAVE_PTHREAD_ATTR_GET_NP /* FreeBSD, DragonFly BSD, NetBSD */
pthread_attr_t attr;