ruby-changes:68211
From: Nobuyoshi <ko1@a...>
Date: Sun, 3 Oct 2021 14:00:16 +0900 (JST)
Subject: [ruby-changes:68211] ff480f2953 (master): Cast to void pointer to suppress -Wformat-pedantic in RUBY_DEBUG_LOG
https://git.ruby-lang.org/ruby.git/commit/?id=ff480f2953 From ff480f29533432dc03a22072d76f42bf8b641e76 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 3 Oct 2021 11:42:31 +0900 Subject: Cast to void pointer to suppress -Wformat-pedantic in RUBY_DEBUG_LOG --- gc.c | 8 ++++---- ractor.c | 2 +- thread.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gc.c b/gc.c index cdee81dd05..8a49a6453e 100644 --- a/gc.c +++ b/gc.c @@ -1868,7 +1868,7 @@ heap_add_freepage(rb_heap_t *heap, struct heap_page *page) https://github.com/ruby/ruby/blob/trunk/gc.c#L1868 page->free_next = heap->free_pages; heap->free_pages = page; - RUBY_DEBUG_LOG("page:%p freelist:%p", page, page->freelist); + RUBY_DEBUG_LOG("page:%p freelist:%p", (void *)page, (void *)page->freelist); asan_poison_memory_region(&page->freelist, sizeof(RVALUE*)); } @@ -2366,7 +2366,7 @@ heap_next_freepage(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t https://github.com/ruby/ruby/blob/trunk/gc.c#L2366 heap->free_pages = page->free_next; GC_ASSERT(page->free_slots != 0); - RUBY_DEBUG_LOG("page:%p freelist:%p cnt:%d", page, page->freelist, page->free_slots); + RUBY_DEBUG_LOG("page:%p freelist:%p cnt:%d", (void *)page, (void *)page->freelist, page->free_slots); asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false); @@ -5701,7 +5701,7 @@ gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *hea https://github.com/ruby/ruby/blob/trunk/gc.c#L5701 do { GC_ASSERT(sweep_page->size_pool == size_pool); - RUBY_DEBUG_LOG("sweep_page:%p", sweep_page); + RUBY_DEBUG_LOG("sweep_page:%p", (void *)sweep_page); struct gc_sweep_context ctx = { .page = sweep_page, @@ -8713,7 +8713,7 @@ rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache) https://github.com/ruby/ruby/blob/trunk/gc.c#L8713 { struct heap_page *page = newobj_cache->using_page; RVALUE *freelist = newobj_cache->freelist; - RUBY_DEBUG_LOG("ractor using_page:%p freelist:%p", page, freelist); + RUBY_DEBUG_LOG("ractor using_page:%p freelist:%p", (void *)page, (void *)freelist); heap_page_freelist_append(page, freelist); diff --git a/ractor.c b/ractor.c index bf19aa62d3..daf6f38f4d 100644 --- a/ractor.c +++ b/ractor.c @@ -1922,7 +1922,7 @@ rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r) https://github.com/ruby/ruby/blob/trunk/ractor.c#L1922 rb_threadptr_interrupt(main_th); } else { - RUBY_DEBUG_LOG("killed (%p)", main_th); + RUBY_DEBUG_LOG("killed (%p)", (void *)main_th); } } } diff --git a/thread.c b/thread.c index 9357d14b8a..148a43aed9 100644 --- a/thread.c +++ b/thread.c @@ -992,7 +992,7 @@ thread_create_core(VALUE thval, struct thread_create_params *params) https://github.com/ruby/ruby/blob/trunk/thread.c#L992 rb_native_mutex_initialize(&th->interrupt_lock); - RUBY_DEBUG_LOG("r:%u th:%p", rb_ractor_id(th->ractor), th); + RUBY_DEBUG_LOG("r:%u th:%p", rb_ractor_id(th->ractor), (void *)th); rb_ractor_living_threads_insert(th->ractor, th); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/