aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-09-13 03:03:27 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-09-13 21:29:08 +0900
commitbe857a19108adb37869ad196d65b90810807dec6 (patch)
treef432289b1af10e0c7451485719d4a6ef4dd3416e /vm.c
parent9312d98801e376223b55361631bcde1f0a8f908f (diff)
downloadruby-be857a19108adb37869ad196d65b90810807dec6.tar.gz
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; 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.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 74226d7e32..f3086d8a14 100644
--- a/vm.c
+++ b/vm.c
@@ -2185,7 +2185,7 @@ get_param(const char *name, size_t default_value, size_t min_value)
}
result = (size_t)(((val -1 + RUBY_VM_SIZE_ALIGN) / RUBY_VM_SIZE_ALIGN) * RUBY_VM_SIZE_ALIGN);
}
- if (0) fprintf(stderr, "%s: %"PRIdSIZE"\n", name, result); /* debug print */
+ if (0) fprintf(stderr, "%s: %"PRIuSIZE"\n", name, result); /* debug print */
return result;
}