summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-11 04:04:12 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-11 04:04:12 +0000
commitbf2ed9633900d3b6ad4f2696bd283db9e6205b4b (patch)
tree5200c77a9465a3f5af9b978f6bc877aec5d42a6b /file.c
parentcef46a5e722dcbbc46a2755b26d38c090ea0d868 (diff)
* 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
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files 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) {