summaryrefslogtreecommitdiff
path: root/io_buffer.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-23 22:51:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-23 22:52:45 +0900
commitb180ffa62270dc32bb69167822b4c698def5c8f7 (patch)
tree209f0db209dafc9c6e0fe24573b06aa4d68694a6 /io_buffer.c
parent41cdf9b11457992f49f1252db83de4280456679e (diff)
downloadruby-b180ffa62270dc32bb69167822b4c698def5c8f7.tar.gz
Fix warnings by old gcc
* Use PRIxSIZE instead of "z" * Fix sign-compare warning * Suppress unused-but-set-variable warning
Diffstat (limited to 'io_buffer.c')
-rw-r--r--io_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_buffer.c b/io_buffer.c
index d9a9f40bd7..7039ef71b8 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -680,10 +680,10 @@ io_buffer_hexdump(VALUE string, size_t width, char *base, size_t size, int first
for (size_t offset = 0; offset < size; offset += width) {
memset(text, '\0', width);
if (first) {
- rb_str_catf(string, "0x%08zx ", offset);
+ rb_str_catf(string, "0x%08" PRIxSIZE " ", offset);
first = 0;
} else {
- rb_str_catf(string, "\n0x%08zx ", offset);
+ rb_str_catf(string, "\n0x%08" PRIxSIZE " ", offset);
}
for (size_t i = 0; i < width; i += 1) {