From bf2ed9633900d3b6ad4f2696bd283db9e6205b4b Mon Sep 17 00:00:00 2001 From: charliesome Date: Sun, 11 Aug 2013 04:04:12 +0000 Subject: [PATCH] * 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 --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 347b7e6d0e..23a218a6de 100644 --- a/file.c +++ b/file.c @@ -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) {