summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-05 14:46:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-05 14:57:31 +0900
commitd2b7e1e4b24633608aba8ef1e00189b00ea2a1d8 (patch)
treee50b1be165c5cfa9381426c697e0189c58e5d6f5
parenta83a51932dbc31b549e11b9da8967f2f52a8b07c (diff)
Protoized old pre-ANSI K&R style definitions
-rw-r--r--coroutine/copy/Context.c6
-rw-r--r--ext/-test-/RUBY_ALIGNOF/c.c2
-rw-r--r--object.c2
-rw-r--r--scheduler.c4
-rw-r--r--thread.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/coroutine/copy/Context.c b/coroutine/copy/Context.c
index f6cf4622823..aa8bb2ff059 100644
--- a/coroutine/copy/Context.c
+++ b/coroutine/copy/Context.c
@@ -17,7 +17,7 @@
#if defined(__sparc)
__attribute__((noinline))
// https://marc.info/?l=linux-sparc&m=131914569320660&w=2
-static void coroutine_flush_register_windows() {
+static void coroutine_flush_register_windows(void) {
__asm__
#ifdef __GNUC__
__volatile__
@@ -34,11 +34,11 @@ static void coroutine_flush_register_windows() {
;
}
#else
-static void coroutine_flush_register_windows() {}
+static void coroutine_flush_register_windows(void) {}
#endif
__attribute__((noinline))
-void *coroutine_stack_pointer() {
+void *coroutine_stack_pointer(void) {
return (void*)(
(char*)__builtin_frame_address(0)
);
diff --git a/ext/-test-/RUBY_ALIGNOF/c.c b/ext/-test-/RUBY_ALIGNOF/c.c
index 5768b8c3ddf..7a9f7cb498d 100644
--- a/ext/-test-/RUBY_ALIGNOF/c.c
+++ b/ext/-test-/RUBY_ALIGNOF/c.c
@@ -9,7 +9,7 @@ struct T {
RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(struct T, t));
void
-Init_RUBY_ALIGNOF()
+Init_RUBY_ALIGNOF(void)
{
// Windows linker mandates this symbol to exist.
}
diff --git a/object.c b/object.c
index 3bc67255520..7343bd6d1c0 100644
--- a/object.c
+++ b/object.c
@@ -1133,7 +1133,7 @@ rb_class_search_ancestor(VALUE cl, VALUE c)
*/
static VALUE
-rb_obj_dummy()
+rb_obj_dummy(void)
{
return Qnil;
}
diff --git a/scheduler.c b/scheduler.c
index 326cb0068f5..9ecb25f188e 100644
--- a/scheduler.c
+++ b/scheduler.c
@@ -39,7 +39,7 @@ Init_Scheduler(void)
}
VALUE
-rb_scheduler_get()
+rb_scheduler_get(void)
{
rb_thread_t *thread = GET_THREAD();
VM_ASSERT(thread);
@@ -76,7 +76,7 @@ rb_threadptr_scheduler_current(rb_thread_t *thread)
}
VALUE
-rb_scheduler_current()
+rb_scheduler_current(void)
{
return rb_threadptr_scheduler_current(GET_THREAD());
}
diff --git a/thread.c b/thread.c
index a1e405cda87..7fcbf9d67b5 100644
--- a/thread.c
+++ b/thread.c
@@ -5402,7 +5402,7 @@ rb_thread_backtrace_locations_m(int argc, VALUE *argv, VALUE thval)
}
void
-Init_Thread_Mutex()
+Init_Thread_Mutex(void)
{
rb_thread_t *th = GET_THREAD();