summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-30 02:44:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-30 02:44:20 +0000
commitb58f080349b1aae9d9102280423e21fc76b8c66d (patch)
treedee0892f732fff6a62030f3d3be65f78f5a1f91f /string.c
parentc8b8b7438e469fc66d981507e8e2085e7ff0208f (diff)
* string.c (tr_trans, rb_str_squeeze_bang, rb_str_split_m): suppress
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/string.c b/string.c
index e60e5ff4b0..d6f09b0bf7 100644
--- a/string.c
+++ b/string.c
@@ -3185,7 +3185,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
rb_encoding *enc;
struct tr trsrc, trrepl;
int cflag = 0;
- int c, last, modify = 0;
+ int c, last = 0, modify = 0;
char *s, *send;
VALUE hash;
@@ -3500,7 +3500,7 @@ rb_str_delete(int argc, VALUE *argv, VALUE str)
static VALUE
rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
{
- rb_encoding *enc;
+ rb_encoding *enc = 0;
VALUE del = 0, nodel = 0;
char *s, *send, *t;
int save, modify = 0;
@@ -3759,6 +3759,7 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
int skip = 1;
int c;
+ end = beg;
while (ptr < eptr) {
c = rb_enc_codepoint(ptr, eptr, enc);
if (skip) {