1
0
Fork 0
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:
Kazuhiro NISHIYAMA 2021-09-28 18:00:03 +09:00 committed by Nobuyoshi Nakada
parent 79f9f8326a
commit 9b18f1bffe
Notes: git 2021-10-20 07:48:49 +09:00
4 changed files with 16 additions and 16 deletions

View file

@ -901,7 +901,7 @@ ractor_send_basket(rb_execution_context_t *ec, rb_ractor_t *r, struct rb_ractor_
else {
ractor_queue_enq(r, rq, b);
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;
if (ractor_wakeup(r, wait_receiving, wakeup_by_close)) {
VM_ASSERT(r->sync.incoming_queue.cnt == 0);
RUBY_DEBUG_LOG("cancel receiving", 0);
RUBY_DEBUG_LOG("cancel receiving");
}
}
else {
@ -1385,7 +1385,7 @@ ractor_close_outgoing(rb_execution_context_t *ec, rb_ractor_t *r)
// raising yielding Ractor
if (!r->yield_atexit &&
ractor_wakeup(r, wait_yielding, wakeup_by_close)) {
RUBY_DEBUG_LOG("cancel yielding", 0);
RUBY_DEBUG_LOG("cancel yielding");
}
}
RACTOR_UNLOCK(r);
@ -1418,7 +1418,7 @@ static void
cancel_single_ractor_mode(void)
{
// 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();

View file

@ -825,7 +825,7 @@ transient_heap_evacuate(void *dmy)
transient_heap_update_status(theap, transient_heap_none);
}
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)
{
ASSERT_vm_locking();
RUBY_DEBUG_LOG("", 0);
RUBY_DEBUG_LOG("");
struct transient_heap* theap = transient_heap_get();

View file

@ -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.
// 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
#define RUBY_DEBUG_LOG(fmt, ...) do { \
#define RUBY_DEBUG_LOG(...) do { \
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)
#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__)) \
ruby_debug_log(file, line, __func__, fmt, __VA_ARGS__); \
ruby_debug_log(file, line, __func__, __VA_ARGS__); \
} while (0)
#else
// do nothing
#define RUBY_DEBUG_LOG(fmt, ...)
#define RUBY_DEBUG_LOG2(file, line, fmt, ...)
#define RUBY_DEBUG_LOG(...)
#define RUBY_DEBUG_LOG2(file, line, ...)
#endif // USE_RUBY_DEBUG_LOG
#endif /* RUBY_DEBUG_H */

View file

@ -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));
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);
}
else {
RUBY_DEBUG_LOG("wait for barrier finish", 0);
RUBY_DEBUG_LOG("wait for barrier finish");
}
// 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;
}
RUBY_DEBUG_LOG("barrier is released. Acquire vm_lock", 0);
RUBY_DEBUG_LOG("barrier is released. Acquire vm_lock");
if (running) {
rb_vm_ractor_blocking_cnt_dec(vm, cr, __FILE__, __LINE__);