ruby-changes:53389
From: nobu <ko1@a...>
Date: Wed, 7 Nov 2018 21:48:42 +0900 (JST)
Subject: [ruby-changes:53389] nobu:r65605 (trunk): Add cast to suppress warnings on Solaris [ci skip]
nobu 2018-11-07 21:48:36 +0900 (Wed, 07 Nov 2018) New Revision: 65605 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65605 Log: Add cast to suppress warnings on Solaris [ci skip] Modified files: trunk/thread.c trunk/vm_dump.c Index: thread.c =================================================================== --- thread.c (revision 65604) +++ thread.c (revision 65605) @@ -321,9 +321,9 @@ rb_thread_s_debug_set(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/thread.c#L321 #endif #ifndef fill_thread_id_str -# define fill_thread_id_string(thid, buf) (void *)(thid) +# define fill_thread_id_string(thid, buf) ((void *)(uintptr_t)(thid)) # define fill_thread_id_str(th) (void)0 -# define thread_id_str(th) ((void *)(th)->thread_id) +# define thread_id_str(th) ((void *)(uintptr_t)(th)->thread_id) # define PRI_THREAD_ID "p" #endif Index: vm_dump.c =================================================================== --- vm_dump.c (revision 65604) +++ vm_dump.c (revision 65605) @@ -1095,7 +1095,7 @@ rb_vmdebug_stack_dump_all_threads(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L1095 ruby_fill_thread_id_string(th->thread_id, buf); fprintf(stderr, "th: %p, native_id: %s\n", th, buf); #else - fprintf(stderr, "th: %p, native_id: %p\n", (void *)th, (void *)th->thread_id); + fprintf(stderr, "th: %p, native_id: %p\n", (void *)th, (void *)(uintptr_t)th->thread_id); #endif rb_vmdebug_stack_dump_raw(th->ec, th->ec->cfp); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/