string.c: suppress warnings
* string.c (rb_str_sub_bang, str_gsub): initialize conditionally assigned variables to suppress maybe-uninitialized warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5752b61d86
commit
fb3bd78725
4
string.c
4
string.c
@ -3947,7 +3947,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
|
||||
rb_encoding *enc;
|
||||
int cr = ENC_CODERANGE(str);
|
||||
long beg0, end0;
|
||||
VALUE match, match0;
|
||||
VALUE match, match0 = Qnil;
|
||||
struct re_registers *regs;
|
||||
char *p, *rp;
|
||||
long len, rlen;
|
||||
@ -4076,7 +4076,7 @@ rb_str_sub(int argc, VALUE *argv, VALUE str)
|
||||
static VALUE
|
||||
str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
||||
{
|
||||
VALUE pat, val, repl, match, match0, dest, hash = Qnil;
|
||||
VALUE pat, val = Qnil, repl, match, match0 = Qnil, dest, hash = Qnil;
|
||||
struct re_registers *regs;
|
||||
long beg, n;
|
||||
long beg0, end0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user