mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
delete unused codes
Suppress compiler warnings.
This commit is contained in:
parent
57cd4623cf
commit
7a9b2039b7
3 changed files with 1 additions and 8 deletions
|
@ -2338,7 +2338,6 @@ rb_check_argv(int argc, VALUE *argv)
|
|||
{
|
||||
VALUE tmp, prog;
|
||||
int i;
|
||||
const char *name = 0;
|
||||
|
||||
rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
|
||||
|
||||
|
@ -2353,7 +2352,6 @@ rb_check_argv(int argc, VALUE *argv)
|
|||
SafeStringValue(prog);
|
||||
StringValueCStr(prog);
|
||||
prog = rb_str_new_frozen(prog);
|
||||
name = RSTRING_PTR(prog);
|
||||
}
|
||||
for (i = 0; i < argc; i++) {
|
||||
SafeStringValue(argv[i]);
|
||||
|
|
5
ruby.c
5
ruby.c
|
@ -1217,12 +1217,9 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
|
|||
case 'T':
|
||||
{
|
||||
size_t numlen;
|
||||
int v = 1;
|
||||
|
||||
if (*++s) {
|
||||
v = scan_oct(s, 2, &numlen);
|
||||
if (numlen == 0)
|
||||
v = 1;
|
||||
scan_oct(s, 2, &numlen);
|
||||
s += numlen;
|
||||
}
|
||||
}
|
||||
|
|
2
string.c
2
string.c
|
@ -4937,10 +4937,8 @@ rb_pat_search(VALUE pat, VALUE str, long pos, int set_backref_str)
|
|||
pos = rb_strseq_index(str, pat, pos, 1);
|
||||
if (set_backref_str) {
|
||||
if (pos >= 0) {
|
||||
VALUE match;
|
||||
str = rb_str_new_frozen(str);
|
||||
rb_backref_set_string(str, pos, RSTRING_LEN(pat));
|
||||
match = rb_backref_get();
|
||||
}
|
||||
else {
|
||||
rb_backref_set(Qnil);
|
||||
|
|
Loading…
Reference in a new issue