From 4d97a5c3123bf7c271cc3007ac7029342558b01c Mon Sep 17 00:00:00 2001 From: rhe Date: Tue, 13 Sep 2016 12:33:13 +0000 Subject: Use PRIuSIZE format specifier for size_t values Use PRIuSIZE instead of PRIdSIZE. This fixes the exception message shown on too large xmalloc2. This commit also fixes other incorrect use of PRIdSIZE in other functions; though most of them are debug print. * gc.c (heap_extend_pages, get_envparam_size, ruby_malloc_size_overflow, gc_profile_dump_on): Use PRIuSIZE instead of PRIdSIZE as the passed value is size_t, not ssize_t. * iseq.c (get_line_info, rb_iseq_disasm_insn): Ditto. * sprintf.c (rb_str_format): Ditto. * thread_win32.c (native_thread_create): Ditto. * vm.c (get_param): Ditto. * ext/objspace/objspace_dump.c (dump_append_string_content, dump_object): Ditto. * ext/socket/raddrinfo.c (host_str, port_str): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread_win32.c') diff --git a/thread_win32.c b/thread_win32.c index 5d0c493276..01d58a26d8 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -614,7 +614,7 @@ native_thread_create(rb_thread_t *th) if (THREAD_DEBUG) { Sleep(0); - thread_debug("create: (th: %p, thid: %p, intr: %p), stack size: %"PRIdSIZE"\n", + thread_debug("create: (th: %p, thid: %p, intr: %p), stack size: %"PRIuSIZE"\n", th, th->thread_id, th->native_thread_data.interrupt_event, stack_size); } -- cgit v1.2.3