diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-30 02:44:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-30 02:44:20 +0000 |
commit | b58f080349b1aae9d9102280423e21fc76b8c66d (patch) | |
tree | dee0892f732fff6a62030f3d3be65f78f5a1f91f /string.c | |
parent | c8b8b7438e469fc66d981507e8e2085e7ff0208f (diff) | |
download | ruby-b58f080349b1aae9d9102280423e21fc76b8c66d.tar.gz |
* 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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) { |