diff options
Diffstat (limited to 'enc')
-rw-r--r-- | enc/shift_jis.c | 2 | ||||
-rw-r--r-- | enc/utf_16le.c | 3 | ||||
-rw-r--r-- | enc/utf_32be.c | 2 | ||||
-rw-r--r-- | enc/utf_32le.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/enc/shift_jis.c b/enc/shift_jis.c index ee726cf71a..b8ca67dba1 100644 --- a/enc/shift_jis.c +++ b/enc/shift_jis.c @@ -175,7 +175,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc) if (enclen(enc, buf) != (p - buf)) return REGERR_INVALID_CODE_POINT_VALUE; #endif - return p - buf; + return (int)(p - buf); } static int diff --git a/enc/utf_16le.c b/enc/utf_16le.c index bec3d22388..0dec8f98c5 100644 --- a/enc/utf_16le.c +++ b/enc/utf_16le.c @@ -56,7 +56,8 @@ static int utf16le_mbc_enc_len(const UChar* p, const OnigUChar* e, OnigEncoding enc ARG_UNUSED) { - int len = e-p, byte; + ptrdiff_t len = e - p; + UChar byte; if (len < 2) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(1); byte = p[1]; diff --git a/enc/utf_32be.c b/enc/utf_32be.c index 61e7d0f1b5..2671448d44 100644 --- a/enc/utf_32be.c +++ b/enc/utf_32be.c @@ -155,7 +155,7 @@ static UChar* utf32be_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED) { - int rem; + ptrdiff_t rem; if (s <= start) return (UChar* )s; diff --git a/enc/utf_32le.c b/enc/utf_32le.c index 3a0a41bba7..aa448200c6 100644 --- a/enc/utf_32le.c +++ b/enc/utf_32le.c @@ -155,7 +155,7 @@ static UChar* utf32le_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED) { - int rem; + ptrdiff_t rem; if (s <= start) return (UChar* )s; |