summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-18 07:41:09 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-18 07:41:09 +0000
commitda1ffe490d589fddcca75f410634b73052668443 (patch)
tree108628cc748ef87b5c646c537a38f774f76f38b4
parentde55ffd02450e2020af9a288b950c6d5d7596fd5 (diff)
* transcode.c: in transcode_search_path, elimintated a warning
on cygwin about pathlen potentially not being initialized git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--transcode.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c59b84edab8..aea52692a76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 14 16:39:39 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * transcode.c: in transcode_search_path, elimintated a warning
+ on cygwin about pathlen potentially not being initialized
+
Sat Oct 18 13:40:27 2008 Tanaka Akira <akr@fsij.org>
* lib/test/unit.rb (assert_nothing_thrown): implemented.
diff --git a/transcode.c b/transcode.c
index 6d02875051c..cfb11bf34d5 100644
--- a/transcode.c
+++ b/transcode.c
@@ -277,7 +277,7 @@ transcode_search_path(const char *sname, const char *dname,
st_data_t val;
st_table *table2;
int found;
- int pathlen;
+ int pathlen = -1;
if (encoding_equal(sname, dname))
return -1;
@@ -349,10 +349,7 @@ transcode_search_path(const char *sname, const char *dname,
st_free_table(bfs.visited);
- if (found)
- return pathlen;
- else
- return -1;
+ return pathlen; /* is -1 if !found */
}
static const rb_transcoder *