Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings on wasi #10332

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static int rb_threadptr_pending_interrupt_empty_p(const rb_thread_t *th);
static const char *thread_status_name(rb_thread_t *th, int detail);
static int hrtime_update_expire(rb_hrtime_t *, const rb_hrtime_t);
NORETURN(static void async_bug_fd(const char *mesg, int errno_arg, int fd));
static int consume_communication_pipe(int fd);
MAYBE_UNUSED(static int consume_communication_pipe(int fd));

static volatile int system_working = 1;
static rb_internal_thread_specific_key_t specific_key_count;
Expand Down Expand Up @@ -259,6 +259,8 @@ timeout_prepare(rb_hrtime_t **to, rb_hrtime_t *rel, rb_hrtime_t *end,
}

MAYBE_UNUSED(NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start)));
MAYBE_UNUSED(static bool th_has_dedicated_nt(const rb_thread_t *th));
MAYBE_UNUSED(static int waitfd_to_waiting_flag(int wfd_event));

#include THREAD_IMPL_SRC

Expand Down
2 changes: 2 additions & 0 deletions thread_none.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
{
}

#if 0
static void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
{
}
#endif

// Do nothing for mutex guard
void
Expand Down
2 changes: 2 additions & 0 deletions thread_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
sched->lock = w32_mutex_create();
}

#if 0
// per-ractor
void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
{
if (GVL_DEBUG) fprintf(stderr, "sched destroy\n");
CloseHandle(sched->lock);
}
#endif

rb_thread_t *
ruby_thread_from_native(void)
Expand Down
2 changes: 1 addition & 1 deletion time.c
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ zone_timelocal(VALUE zone, VALUE time)
struct time_object *tobj = RTYPEDDATA_GET_DATA(time);
wideval_t t, s;

split_second(tobj->timew, &t, &s);
wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s);
tm = tm_from_time(rb_cTimeTM, time);
utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm);
if (UNDEF_P(utc)) return 0;
Expand Down