1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
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");
@ -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");

View file

@ -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;