Skip to content

Commit

Permalink
Suppress unused-variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 16, 2021
1 parent ee7bd7d commit 07b12a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions process.c
Expand Up @@ -4088,10 +4088,10 @@ struct child_handler_disabler_state
static void
disable_child_handler_before_fork(struct child_handler_disabler_state *old)
{
#ifdef HAVE_PTHREAD_SIGMASK
int ret;
sigset_t all;

#ifdef HAVE_PTHREAD_SIGMASK
ret = sigfillset(&all);
if (ret == -1)
rb_sys_fail("sigfillset");
Expand All @@ -4108,9 +4108,9 @@ disable_child_handler_before_fork(struct child_handler_disabler_state *old)
static void
disable_child_handler_fork_parent(struct child_handler_disabler_state *old)
{
#ifdef HAVE_PTHREAD_SIGMASK
int ret;

#ifdef HAVE_PTHREAD_SIGMASK
ret = pthread_sigmask(SIG_SETMASK, &old->sigmask, NULL); /* not async-signal-safe */
if (ret != 0) {
rb_syserr_fail(ret, "pthread_sigmask");
Expand Down
4 changes: 2 additions & 2 deletions thread_pthread.c
Expand Up @@ -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;
Expand Down

0 comments on commit 07b12a1

Please sign in to comment.