From 771f6dd75dd38e378e2e0f6de09398b6660b09f2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 8 Jul 2021 16:38:08 +0900 Subject: [PATCH] [ruby/stringio] Suppress a sign-compare warning https://github.com/ruby/stringio/commit/a88c070e0b --- ext/stringio/stringio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 98b9d9aab1..295650e89e 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -65,7 +65,7 @@ strio_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, n = strchr(n, '|'); } e = strchr(++n, ':'); - len = e ? e - n : strlen(n); + len = e ? e - n : (long)strlen(n); if (len > 0 && len <= ENCODING_MAXNAMELEN) { if (e) { memcpy(encname, n, len);