ruby-changes:30428
From: charliesome <ko1@a...>
Date: Sun, 11 Aug 2013 13:04:19 +0900 (JST)
Subject: [ruby-changes:30428] charliesome:r42507 (trunk): * file.c (rb_str_normalize_ospath): fix mixed code and declaration warning
charliesome 2013-08-11 13:04:12 +0900 (Sun, 11 Aug 2013) New Revision: 42507 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42507 Log: * file.c (rb_str_normalize_ospath): fix mixed code and declaration warning Modified files: trunk/file.c Index: file.c =================================================================== --- file.c (revision 42506) +++ file.c (revision 42507) @@ -279,7 +279,7 @@ rb_str_normalize_ospath(const char *ptr, https://github.com/ruby/ruby/blob/trunk/file.c#L279 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, https://github.com/ruby/ruby/blob/trunk/file.c#L288 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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/