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 + + * enc/unicode.c: fix implicit conversion error with clang. fixup r53548. + * string.c: ditto. + Sat Jan 16 10:31:00 2016 SHIBATA Hiroshi * 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;