[前][次][番号順一覧][スレッド一覧]

ruby-changes:70986

From: Kazuhiro <ko1@a...>
Date: Sat, 22 Jan 2022 15:48:39 +0900 (JST)
Subject: [ruby-changes:70986] c00e360bc0 (master): Fix error: old-style function definition

https://git.ruby-lang.org/ruby.git/commit/?id=c00e360bc0

From c00e360bc09811669b87f82a0ee97e13b9cba02f Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Sat, 22 Jan 2022 15:46:06 +0900
Subject: Fix error: old-style function definition

https://rubyci.s3.amazonaws.com/debian-riscv64/ruby-master/log/20220122T050018Z.log.html.gz#miniruby
```
compiling vm_trace.c
vm_trace.c: In function 'rb_vm_memsize_postponed_job_buffer':
vm_trace.c:1599:1: error: old-style function definition [-Werror=old-style-definition]
 1599 | rb_vm_memsize_postponed_job_buffer()
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
---
 vm.c       | 2 +-
 vm_trace.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vm.c b/vm.c
index cb7007ac133..4cede5e2471 100644
--- a/vm.c
+++ b/vm.c
@@ -2733,7 +2733,7 @@ ruby_vm_destruct(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/vm.c#L2733
 
 size_t rb_vm_memsize_waiting_list(struct list_head *waiting_list); // process.c
 size_t rb_vm_memsize_waiting_fds(struct list_head *waiting_fds); // thread.c
-size_t rb_vm_memsize_postponed_job_buffer(); // vm_trace.c
+size_t rb_vm_memsize_postponed_job_buffer(void); // vm_trace.c
 size_t rb_vm_memsize_workqueue(struct list_head *workqueue); // vm_trace.c
 
 // Used for VM memsize reporting. Returns the size of the at_exit list by
diff --git a/vm_trace.c b/vm_trace.c
index 7f6a60b0cbe..5fa9acd4872 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1596,7 +1596,7 @@ rb_vm_memsize_workqueue(struct list_head *workqueue) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1596
 // Used for VM memsize reporting. Returns the total size of the postponed job
 // buffer that was allocated at initialization.
 size_t
-rb_vm_memsize_postponed_job_buffer()
+rb_vm_memsize_postponed_job_buffer(void)
 {
     return sizeof(rb_postponed_job_t) * MAX_POSTPONED_JOB;
 }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]