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 | 0a4f489c8979046f74584dde42ff6c6d313e4ccb (patch) | |
tree | dee0892f732fff6a62030f3d3be65f78f5a1f91f /string.c | |
parent | 3e64dc30626092eeed408eca0da11bbe14913e5f (diff) | |
download | ruby-0a4f489c8979046f74584dde42ff6c6d313e4ccb.tar.gz ruby-0a4f489c8979046f74584dde42ff6c6d313e4ccb.tar.xz ruby-0a4f489c8979046f74584dde42ff6c6d313e4ccb.zip |
* string.c (tr_trans, rb_str_squeeze_bang, rb_str_split_m): suppress
warnings.
git-svn-id: http://svn.ruby-lang.org/repos/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) { |