Suppress unused-variable warnings

This commit is contained in:
Nobuyoshi Nakada 2021-08-16 16:02:49 +09:00
parent ee7bd7d732
commit 07b12a1f48
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
Notes: git 2021-08-16 18:32:53 +09:00
2 changed files with 4 additions and 4 deletions

View File

@ -4088,10 +4088,10 @@ struct child_handler_disabler_state
static void static void
disable_child_handler_before_fork(struct child_handler_disabler_state *old) disable_child_handler_before_fork(struct child_handler_disabler_state *old)
{ {
#ifdef HAVE_PTHREAD_SIGMASK
int ret; int ret;
sigset_t all; sigset_t all;
#ifdef HAVE_PTHREAD_SIGMASK
ret = sigfillset(&all); ret = sigfillset(&all);
if (ret == -1) if (ret == -1)
rb_sys_fail("sigfillset"); rb_sys_fail("sigfillset");
@ -4108,9 +4108,9 @@ disable_child_handler_before_fork(struct child_handler_disabler_state *old)
static void static void
disable_child_handler_fork_parent(struct child_handler_disabler_state *old) disable_child_handler_fork_parent(struct child_handler_disabler_state *old)
{ {
#ifdef HAVE_PTHREAD_SIGMASK
int ret; int ret;
#ifdef HAVE_PTHREAD_SIGMASK
ret = pthread_sigmask(SIG_SETMASK, &old->sigmask, NULL); /* not async-signal-safe */ ret = pthread_sigmask(SIG_SETMASK, &old->sigmask, NULL); /* not async-signal-safe */
if (ret != 0) { if (ret != 0) {
rb_syserr_fail(ret, "pthread_sigmask"); rb_syserr_fail(ret, "pthread_sigmask");

View File

@ -765,10 +765,10 @@ get_stack(void **addr, size_t *size)
# endif # endif
# ifdef HAVE_PTHREAD_ATTR_GETGUARDSIZE # ifdef HAVE_PTHREAD_ATTR_GETGUARDSIZE
CHECK_ERR(pthread_attr_getguardsize(&attr, &guard)); CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
*size -= guard;
# else # else
*size -= getpagesize(); guard = getpagesize();
# endif # endif
*size -= guard;
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
#elif defined HAVE_PTHREAD_ATTR_GET_NP /* FreeBSD, DragonFly BSD, NetBSD */ #elif defined HAVE_PTHREAD_ATTR_GET_NP /* FreeBSD, DragonFly BSD, NetBSD */
pthread_attr_t attr; pthread_attr_t attr;