mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Supress warning: data argument not used by format string [-Wformat-extra-args]
This commit is contained in:
parent
79f9f8326a
commit
9b18f1bffe
Notes:
git
2021-10-20 07:48:49 +09:00
4 changed files with 16 additions and 16 deletions
8
ractor.c
8
ractor.c
|
@ -901,7 +901,7 @@ ractor_send_basket(rb_execution_context_t *ec, rb_ractor_t *r, struct rb_ractor_
|
||||||
else {
|
else {
|
||||||
ractor_queue_enq(r, rq, b);
|
ractor_queue_enq(r, rq, b);
|
||||||
if (ractor_wakeup(r, wait_receiving, wakeup_by_send)) {
|
if (ractor_wakeup(r, wait_receiving, wakeup_by_send)) {
|
||||||
RUBY_DEBUG_LOG("wakeup", 0);
|
RUBY_DEBUG_LOG("wakeup");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1348,7 @@ ractor_close_incoming(rb_execution_context_t *ec, rb_ractor_t *r)
|
||||||
r->sync.incoming_port_closed = true;
|
r->sync.incoming_port_closed = true;
|
||||||
if (ractor_wakeup(r, wait_receiving, wakeup_by_close)) {
|
if (ractor_wakeup(r, wait_receiving, wakeup_by_close)) {
|
||||||
VM_ASSERT(r->sync.incoming_queue.cnt == 0);
|
VM_ASSERT(r->sync.incoming_queue.cnt == 0);
|
||||||
RUBY_DEBUG_LOG("cancel receiving", 0);
|
RUBY_DEBUG_LOG("cancel receiving");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1385,7 +1385,7 @@ ractor_close_outgoing(rb_execution_context_t *ec, rb_ractor_t *r)
|
||||||
// raising yielding Ractor
|
// raising yielding Ractor
|
||||||
if (!r->yield_atexit &&
|
if (!r->yield_atexit &&
|
||||||
ractor_wakeup(r, wait_yielding, wakeup_by_close)) {
|
ractor_wakeup(r, wait_yielding, wakeup_by_close)) {
|
||||||
RUBY_DEBUG_LOG("cancel yielding", 0);
|
RUBY_DEBUG_LOG("cancel yielding");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RACTOR_UNLOCK(r);
|
RACTOR_UNLOCK(r);
|
||||||
|
@ -1418,7 +1418,7 @@ static void
|
||||||
cancel_single_ractor_mode(void)
|
cancel_single_ractor_mode(void)
|
||||||
{
|
{
|
||||||
// enable multi-ractor mode
|
// enable multi-ractor mode
|
||||||
RUBY_DEBUG_LOG("enable multi-ractor mode", 0);
|
RUBY_DEBUG_LOG("enable multi-ractor mode");
|
||||||
|
|
||||||
VALUE was_disabled = rb_gc_enable();
|
VALUE was_disabled = rb_gc_enable();
|
||||||
|
|
||||||
|
|
|
@ -825,7 +825,7 @@ transient_heap_evacuate(void *dmy)
|
||||||
transient_heap_update_status(theap, transient_heap_none);
|
transient_heap_update_status(theap, transient_heap_none);
|
||||||
}
|
}
|
||||||
if (gc_disabled != Qtrue) rb_gc_enable();
|
if (gc_disabled != Qtrue) rb_gc_enable();
|
||||||
RUBY_DEBUG_LOG("finish", 0);
|
RUBY_DEBUG_LOG("finish");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -962,7 +962,7 @@ void
|
||||||
rb_transient_heap_finish_marking(void)
|
rb_transient_heap_finish_marking(void)
|
||||||
{
|
{
|
||||||
ASSERT_vm_locking();
|
ASSERT_vm_locking();
|
||||||
RUBY_DEBUG_LOG("", 0);
|
RUBY_DEBUG_LOG("");
|
||||||
|
|
||||||
struct transient_heap* theap = transient_heap_get();
|
struct transient_heap* theap = transient_heap_get();
|
||||||
|
|
||||||
|
|
14
vm_debug.h
14
vm_debug.h
|
@ -94,24 +94,24 @@ bool ruby_debug_log_filter(const char *func_name);
|
||||||
|
|
||||||
// convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
|
// convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
|
||||||
// You can use this macro for temporary usage (you should not commit it).
|
// You can use this macro for temporary usage (you should not commit it).
|
||||||
#define _RUBY_DEBUG_LOG(fmt, ...) ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)
|
#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
|
||||||
#if USE_RUBY_DEBUG_LOG
|
#if USE_RUBY_DEBUG_LOG
|
||||||
|
|
||||||
#define RUBY_DEBUG_LOG(fmt, ...) do { \
|
#define RUBY_DEBUG_LOG(...) do { \
|
||||||
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
||||||
ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__); \
|
ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define RUBY_DEBUG_LOG2(file, line, fmt, ...) do { \
|
#define RUBY_DEBUG_LOG2(file, line, ...) do { \
|
||||||
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
||||||
ruby_debug_log(file, line, __func__, fmt, __VA_ARGS__); \
|
ruby_debug_log(file, line, __func__, __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// do nothing
|
// do nothing
|
||||||
#define RUBY_DEBUG_LOG(fmt, ...)
|
#define RUBY_DEBUG_LOG(...)
|
||||||
#define RUBY_DEBUG_LOG2(file, line, fmt, ...)
|
#define RUBY_DEBUG_LOG2(file, line, ...)
|
||||||
#endif // USE_RUBY_DEBUG_LOG
|
#endif // USE_RUBY_DEBUG_LOG
|
||||||
|
|
||||||
#endif /* RUBY_DEBUG_H */
|
#endif /* RUBY_DEBUG_H */
|
||||||
|
|
|
@ -76,11 +76,11 @@ vm_lock_enter(rb_ractor_t *cr, rb_vm_t *vm, bool locked, bool no_barrier, unsign
|
||||||
VM_ASSERT(rb_ractor_status_p(cr, ractor_blocking));
|
VM_ASSERT(rb_ractor_status_p(cr, ractor_blocking));
|
||||||
|
|
||||||
if (vm_barrier_finish_p(vm)) {
|
if (vm_barrier_finish_p(vm)) {
|
||||||
RUBY_DEBUG_LOG("wakeup barrier owner", 0);
|
RUBY_DEBUG_LOG("wakeup barrier owner");
|
||||||
rb_native_cond_signal(&vm->ractor.sync.barrier_cond);
|
rb_native_cond_signal(&vm->ractor.sync.barrier_cond);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RUBY_DEBUG_LOG("wait for barrier finish", 0);
|
RUBY_DEBUG_LOG("wait for barrier finish");
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for restart
|
// wait for restart
|
||||||
|
@ -91,7 +91,7 @@ vm_lock_enter(rb_ractor_t *cr, rb_vm_t *vm, bool locked, bool no_barrier, unsign
|
||||||
vm->ractor.sync.lock_owner = cr;
|
vm->ractor.sync.lock_owner = cr;
|
||||||
}
|
}
|
||||||
|
|
||||||
RUBY_DEBUG_LOG("barrier is released. Acquire vm_lock", 0);
|
RUBY_DEBUG_LOG("barrier is released. Acquire vm_lock");
|
||||||
|
|
||||||
if (running) {
|
if (running) {
|
||||||
rb_vm_ractor_blocking_cnt_dec(vm, cr, __FILE__, __LINE__);
|
rb_vm_ractor_blocking_cnt_dec(vm, cr, __FILE__, __LINE__);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue