summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <[email protected]>2024-02-14 10:35:19 +0900
committerKazuhiro NISHIYAMA <[email protected]>2024-02-14 10:40:26 +0900
commitc54622c657cbdd8fd13790d5c339b8dbadff8b14 (patch)
tree2a893306520bc1c2d994a5d6c4bc49e484aa8735
parent8e3eb8c9b4ba55e8fd8b9174c15ac79b59dbd938 (diff)
Fix a warning with USE_RUBY_DEBUG_LOG=1 on macOS
``` compiling ../thread.c In file included from ../thread.c:263: In file included from ../thread_pthread.c:2870: ../thread_pthread_mn.c:777:43: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t' (aka 'unsigned long long') [-Wformat] RUBY_DEBUG_LOG("abs:%lu", abs); ~~~ ^~~ %llu ../vm_debug.h:110:74: note: expanded from macro 'RUBY_DEBUG_LOG' ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \ ^~~~~~~~~~~ 1 warning generated. ```
-rw-r--r--thread_pthread_mn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread_mn.c b/thread_pthread_mn.c
index 503815fa1c..d26ddd449a 100644
--- a/thread_pthread_mn.c
+++ b/thread_pthread_mn.c
@@ -774,7 +774,7 @@ timer_thread_register_waiting(rb_thread_t *th, int fd, enum thread_sched_waiting
ccan_list_add_tail(&timer_th.waiting, &th->sched.waiting_reason.node);
}
else {
- RUBY_DEBUG_LOG("abs:%lu", abs);
+ RUBY_DEBUG_LOG("abs:%lu", (unsigned long)abs);
VM_ASSERT(flags & thread_sched_waiting_timeout);
// insert th to sorted list (TODO: O(n))