summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-16 01:51:58 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-16 01:51:58 +0000
commit219467abde26543b8cab55a95db2c03c33cfc241 (patch)
tree92e43da1cb5432721b4eb871213830d377966f08
parent203e604f46e2adc95676014a8a437201f8a65bb3 (diff)
* enc/unicode.c: fix implicit conversion error with clang. fixup r53548.
* string.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--enc/unicode.c2
-rw-r--r--string.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index befec75f86..73a47277ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jan 16 10:51:19 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * enc/unicode.c: fix implicit conversion error with clang. fixup r53548.
+ * string.c: ditto.
+
Sat Jan 16 10:31:00 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* common.mk: test-sample was changed to test-basic.
diff --git a/enc/unicode.c b/enc/unicode.c
index 2f45f2f88c..365283e591 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -630,5 +630,5 @@ onigenc_unicode_case_map(OnigCaseFoldType* flags,
}
to += ONIGENC_CODE_TO_MBC(enc, code, to);
}
- return to-to_start;
+ return (int)(to-to_start);
}
diff --git a/string.c b/string.c
index 6e9bde8e76..c78d30fe63 100644
--- a/string.c
+++ b/string.c
@@ -5672,7 +5672,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
while (source_current < source_end) {
/* increase multiplier using buffer count to converge quickly */
- int capa = (source_end-source_current)*++buffer_count + CASE_MAPPING_ADDITIONAL_LENGTH;
+ int capa = (int)(source_end-source_current)*++buffer_count + CASE_MAPPING_ADDITIONAL_LENGTH;
current_buffer->next = (mapping_buffer*)ALLOC_N(char, sizeof(mapping_buffer)+capa);
current_buffer = current_buffer->next;
current_buffer->next = NULL;