diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-08 16:38:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-08 16:43:22 +0900 |
commit | 771f6dd75dd38e378e2e0f6de09398b6660b09f2 (patch) | |
tree | f88448b7d47f51381d479431a1017a6c0bec2e27 /ext | |
parent | 3b36e34b9081fc0e43b2fde484f6d07f45ddb2b1 (diff) | |
download | ruby-771f6dd75dd38e378e2e0f6de09398b6660b09f2.tar.gz |
[ruby/stringio] Suppress a sign-compare warning
https://github.com/ruby/stringio/commit/a88c070e0b
Diffstat (limited to 'ext')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |