summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 *