From c495d08c5bd1233e2c6228133892730d5a78e535 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 12 Dec 2024 16:00:26 +0900 Subject: [PATCH] mruby-io (mrb_file__gethome): add casts to stop type warnings --- mrbgems/mruby-io/src/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 4759a401c..589f1be14 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -381,7 +381,7 @@ mrb_file__gethome(mrb_state *mrb, mrb_value klass) char *pathp = RSTRING_PTR(path); const char *const pathend = pathp + RSTRING_LEN(path); for (;;) { - pathp = memchr(pathp, '\\', pathend - pathp); + pathp = memchr((void*)pathp, '\\', (size_t)(pathend - pathp)); if (!pathp) break; *pathp++ = '/'; }