ruby-changes:66731
From: Nobuyoshi <ko1@a...>
Date: Thu, 8 Jul 2021 16:48:18 +0900 (JST)
Subject: [ruby-changes:66731] 771f6dd75d (master): [ruby/stringio] Suppress a sign-compare warning
https://git.ruby-lang.org/ruby.git/commit/?id=771f6dd75d From 771f6dd75dd38e378e2e0f6de09398b6660b09f2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 8 Jul 2021 16:38:08 +0900 Subject: [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 98b9d9a..295650e 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, https://github.com/ruby/ruby/blob/trunk/ext/stringio/stringio.c#L65 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); -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/