1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (rb_str_normalize_ospath): fix mixed code and declaration warning

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
charliesome 2013-08-11 04:04:12 +00:00
parent cef46a5e72
commit bf2ed96339

4
file.c
View file

@ -279,7 +279,7 @@ rb_str_normalize_ospath(const char *ptr, long len)
rb_enc_associate(str, enc);
while (p < e) {
int l;
int l, c;
int r = rb_enc_precise_mbclen(p, e, enc);
if (!MBCLEN_CHARFOUND_P(r)) {
/* invalid byte shall not happen but */
@ -288,7 +288,7 @@ rb_str_normalize_ospath(const char *ptr, long len)
p += 1;
}
l = MBCLEN_CHARFOUND_LEN(r);
int c = rb_enc_mbc_to_codepoint(p, e, enc);
c = rb_enc_mbc_to_codepoint(p, e, enc);
if ((0x2000 <= c && c <= 0x2FFF) || (0xF900 <= c && c <= 0xFAFF) ||
(0x2F800 <= c && c <= 0x2FAFF)) {
if (p - p1 > 0) {