mruby-io (mrb_file__gethome): add casts to stop type warnings

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-12-12 16:00:26 +09:00
parent 423c12e985
commit c495d08c5b
+1 -1
View File
@@ -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++ = '/';
}