зеркало из https://github.com/github/ruby.git
banish some warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8a6eb889e0
Коммит
0517b43c5b
2
array.c
2
array.c
|
@ -2006,7 +2006,7 @@ rb_ary_transpose(VALUE ary)
|
|||
}
|
||||
}
|
||||
else if (elen != RARRAY(tmp)->len) {
|
||||
rb_raise(rb_eIndexError, "element size differs (%d should be %d)",
|
||||
rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
|
||||
RARRAY(tmp)->len, elen);
|
||||
}
|
||||
for (j=0; j<elen; j++) {
|
||||
|
|
|
@ -242,7 +242,6 @@ fdbm_select(obj)
|
|||
VALUE obj;
|
||||
{
|
||||
VALUE new = rb_ary_new();
|
||||
int i;
|
||||
datum key, val;
|
||||
DBM *dbm;
|
||||
struct dbmdata *dbmp;
|
||||
|
|
|
@ -126,7 +126,6 @@ VALUE
|
|||
rb_dlhandle_sym(VALUE self, VALUE sym)
|
||||
{
|
||||
void (*func)();
|
||||
struct sym_data *data;
|
||||
struct dl_handle *dlhandle;
|
||||
void *handle;
|
||||
const char *name;
|
||||
|
|
|
@ -338,7 +338,6 @@ fgdbm_select(obj)
|
|||
VALUE obj;
|
||||
{
|
||||
VALUE new = rb_ary_new();
|
||||
int i;
|
||||
GDBM_FILE dbm;
|
||||
struct dbmdata *dbmp;
|
||||
VALUE keystr;
|
||||
|
|
|
@ -574,7 +574,6 @@ ossl_start_ssl(VALUE self, int (*func)())
|
|||
{
|
||||
SSL *ssl;
|
||||
OpenFile *fptr;
|
||||
VALUE cb;
|
||||
int ret;
|
||||
|
||||
Data_Get_Struct(self, SSL, ssl);
|
||||
|
|
|
@ -59,7 +59,6 @@ readline_readline(argc, argv, self)
|
|||
char *prompt = NULL;
|
||||
char *buff;
|
||||
int status;
|
||||
OpenFile *ofp, *ifp;
|
||||
|
||||
rb_secure(4);
|
||||
if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
|
||||
|
|
|
@ -219,7 +219,6 @@ fsdbm_select(obj)
|
|||
VALUE obj;
|
||||
{
|
||||
VALUE new = rb_ary_new();
|
||||
int i;
|
||||
datum key, val;
|
||||
DBM *dbm;
|
||||
struct dbmdata *dbmp;
|
||||
|
|
2
io.c
2
io.c
|
@ -1079,7 +1079,7 @@ static VALUE
|
|||
rb_io_inspect(VALUE obj)
|
||||
{
|
||||
OpenFile *fptr;
|
||||
char *buf, *cname, *st = "";
|
||||
char *cname, *st = "";
|
||||
|
||||
fptr = RFILE(rb_io_taint_check(obj))->fptr;
|
||||
if (!fptr || !fptr->path) return rb_any_to_s(obj);
|
||||
|
|
2
pack.c
2
pack.c
|
@ -2056,7 +2056,7 @@ utf8_to_uv(char *p, long *lenp)
|
|||
rb_raise(rb_eArgError, "malformed UTF-8 character");
|
||||
}
|
||||
if (n > *lenp) {
|
||||
rb_raise(rb_eArgError, "malformed UTF-8 character (expected %d bytes, given %d bytes)",
|
||||
rb_raise(rb_eArgError, "malformed UTF-8 character (expected %ld bytes, given %ld bytes)",
|
||||
n, *lenp);
|
||||
}
|
||||
*lenp = n--;
|
||||
|
|
20
parse.y
20
parse.y
|
@ -4379,9 +4379,6 @@ none : /* none */
|
|||
# undef yylval
|
||||
# define yylval (*((YYSTYPE*)(parser->parser_yylval)))
|
||||
|
||||
#ifndef RIPPER
|
||||
static VALUE rb_parser_s_new _((void));
|
||||
#endif
|
||||
static int parser_regx_options _((struct parser_params*));
|
||||
static int parser_tokadd_string _((struct parser_params*,int,int,int,long*));
|
||||
static int parser_parse_string _((struct parser_params*,NODE*));
|
||||
|
@ -4531,7 +4528,6 @@ yycompile(parser, f, line)
|
|||
int line;
|
||||
{
|
||||
int n;
|
||||
NODE *node = 0;
|
||||
struct RVarmap *vp, *vars = ruby_dyna_vars;
|
||||
const char *kcode_save;
|
||||
|
||||
|
@ -7397,7 +7393,7 @@ rb_backref_error(node)
|
|||
{
|
||||
switch (nd_type(node)) {
|
||||
case NODE_NTH_REF:
|
||||
rb_compile_error("Can't set variable $%d", node->nd_nth);
|
||||
rb_compile_error("Can't set variable $%ld", node->nd_nth);
|
||||
break;
|
||||
case NODE_BACK_REF:
|
||||
rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
|
||||
|
@ -8076,20 +8072,6 @@ new_call(r,m,a)
|
|||
return NEW_CALL(r,m,a);
|
||||
}
|
||||
|
||||
static NODE*
|
||||
fcall_gen(parser, m, a)
|
||||
struct parser_params *parser;
|
||||
ID m;
|
||||
NODE *a;
|
||||
{
|
||||
if (is_local_id(m)) {
|
||||
if ((dyna_in_block() && rb_dvar_defined(m)) || local_id(m)) {
|
||||
return NEW_CALL(gettable(m), rb_intern("call"), a);
|
||||
}
|
||||
}
|
||||
return NEW_FCALL(m,a);
|
||||
}
|
||||
|
||||
static NODE*
|
||||
new_fcall_gen(parser, m, a)
|
||||
struct parser_params *parser;
|
||||
|
|
2
signal.c
2
signal.c
|
@ -571,7 +571,7 @@ static VALUE
|
|||
trap(struct trap_arg *arg)
|
||||
{
|
||||
sighandler_t func, oldfunc;
|
||||
VALUE command, tmp, oldcmd;
|
||||
VALUE command, oldcmd;
|
||||
int sig = -1;
|
||||
char *s;
|
||||
|
||||
|
|
4
struct.c
4
struct.c
|
@ -48,7 +48,7 @@ rb_struct_members(VALUE s)
|
|||
VALUE members = rb_struct_s_members(rb_obj_class(s));
|
||||
|
||||
if (RSTRUCT(s)->len != RARRAY(members)->len) {
|
||||
rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
|
||||
rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
|
||||
RARRAY(members)->len, RSTRUCT(s)->len);
|
||||
}
|
||||
return members;
|
||||
|
@ -583,7 +583,7 @@ rb_struct_aset_id(VALUE s, ID id, VALUE val)
|
|||
rb_struct_modify(s);
|
||||
len = RARRAY(members)->len;
|
||||
if (RSTRUCT(s)->len != RARRAY(members)->len) {
|
||||
rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
|
||||
rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
|
||||
RARRAY(members)->len, RSTRUCT(s)->len);
|
||||
}
|
||||
for (i=0; i<len; i++) {
|
||||
|
|
|
@ -1165,7 +1165,7 @@ rb_autoload(VALUE mod, ID id, const char *file)
|
|||
struct st_table *tbl;
|
||||
|
||||
if (!rb_is_const_id(id)) {
|
||||
rb_raise(rb_eNameError, "autoload must be constant name", rb_id2name(id));
|
||||
rb_raise(rb_eNameError, "autoload must be constant name: %s", rb_id2name(id));
|
||||
}
|
||||
if (!file || !*file) {
|
||||
rb_raise(rb_eArgError, "empty file name");
|
||||
|
|
Загрузка…
Ссылка в новой задаче