ruby-changes:63954
From: Nobuyoshi <ko1@a...>
Date: Sat, 5 Dec 2020 14:58:18 +0900 (JST)
Subject: [ruby-changes:63954] d2b7e1e4b2 (master): Protoized old pre-ANSI K&R style definitions
https://git.ruby-lang.org/ruby.git/commit/?id=d2b7e1e4b2 From d2b7e1e4b24633608aba8ef1e00189b00ea2a1d8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 5 Dec 2020 14:46:34 +0900 Subject: Protoized old pre-ANSI K&R style definitions diff --git a/coroutine/copy/Context.c b/coroutine/copy/Context.c index f6cf462..aa8bb2f 100644 --- a/coroutine/copy/Context.c +++ b/coroutine/copy/Context.c @@ -17,7 +17,7 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/copy/Context.c#L17 #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() { https://github.com/ruby/ruby/blob/trunk/coroutine/copy/Context.c#L34 ; } #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 5768b8c..7a9f7cb 100644 --- a/ext/-test-/RUBY_ALIGNOF/c.c +++ b/ext/-test-/RUBY_ALIGNOF/c.c @@ -9,7 +9,7 @@ struct T { https://github.com/ruby/ruby/blob/trunk/ext/-test-/RUBY_ALIGNOF/c.c#L9 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 3bc6725..7343bd6 100644 --- a/object.c +++ b/object.c @@ -1133,7 +1133,7 @@ rb_class_search_ancestor(VALUE cl, VALUE c) https://github.com/ruby/ruby/blob/trunk/object.c#L1133 */ static VALUE -rb_obj_dummy() +rb_obj_dummy(void) { return Qnil; } diff --git a/scheduler.c b/scheduler.c index 326cb00..9ecb25f 100644 --- a/scheduler.c +++ b/scheduler.c @@ -39,7 +39,7 @@ Init_Scheduler(void) https://github.com/ruby/ruby/blob/trunk/scheduler.c#L39 } 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) https://github.com/ruby/ruby/blob/trunk/scheduler.c#L76 } VALUE -rb_scheduler_current() +rb_scheduler_current(void) { return rb_threadptr_scheduler_current(GET_THREAD()); } diff --git a/thread.c b/thread.c index a1e405c..7fcbf9d 100644 --- a/thread.c +++ b/thread.c @@ -5402,7 +5402,7 @@ rb_thread_backtrace_locations_m(int argc, VALUE *argv, VALUE thval) https://github.com/ruby/ruby/blob/trunk/thread.c#L5402 } void -Init_Thread_Mutex() +Init_Thread_Mutex(void) { rb_thread_t *th = GET_THREAD(); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/