* 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
Родитель cef46a5e72
Коммит bf2ed96339
1 изменённых файлов: 2 добавлений и 2 удалений

4
file.c
Просмотреть файл

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