Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

banish some warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 0517b43c5b58ccc2acddea80cdfa4e16e19aa84d 1 parent 8a6eb88
akr akr authored
2  array.c
@@ -2006,7 +2006,7 @@ rb_ary_transpose(VALUE ary)
2006 2006 }
2007 2007 }
2008 2008 else if (elen != RARRAY(tmp)->len) {
2009   - rb_raise(rb_eIndexError, "element size differs (%d should be %d)",
  2009 + rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
2010 2010 RARRAY(tmp)->len, elen);
2011 2011 }
2012 2012 for (j=0; j<elen; j++) {
1  ext/dbm/dbm.c
@@ -242,7 +242,6 @@ fdbm_select(obj)
242 242 VALUE obj;
243 243 {
244 244 VALUE new = rb_ary_new();
245   - int i;
246 245 datum key, val;
247 246 DBM *dbm;
248 247 struct dbmdata *dbmp;
1  ext/dl/handle.c
@@ -126,7 +126,6 @@ VALUE
126 126 rb_dlhandle_sym(VALUE self, VALUE sym)
127 127 {
128 128 void (*func)();
129   - struct sym_data *data;
130 129 struct dl_handle *dlhandle;
131 130 void *handle;
132 131 const char *name;
1  ext/gdbm/gdbm.c
@@ -338,7 +338,6 @@ fgdbm_select(obj)
338 338 VALUE obj;
339 339 {
340 340 VALUE new = rb_ary_new();
341   - int i;
342 341 GDBM_FILE dbm;
343 342 struct dbmdata *dbmp;
344 343 VALUE keystr;
1  ext/openssl/ossl_ssl.c
@@ -574,7 +574,6 @@ ossl_start_ssl(VALUE self, int (*func)())
574 574 {
575 575 SSL *ssl;
576 576 OpenFile *fptr;
577   - VALUE cb;
578 577 int ret;
579 578
580 579 Data_Get_Struct(self, SSL, ssl);
1  ext/readline/readline.c
@@ -59,7 +59,6 @@ readline_readline(argc, argv, self)
59 59 char *prompt = NULL;
60 60 char *buff;
61 61 int status;
62   - OpenFile *ofp, *ifp;
63 62
64 63 rb_secure(4);
65 64 if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
1  ext/sdbm/init.c
@@ -219,7 +219,6 @@ fsdbm_select(obj)
219 219 VALUE obj;
220 220 {
221 221 VALUE new = rb_ary_new();
222   - int i;
223 222 datum key, val;
224 223 DBM *dbm;
225 224 struct dbmdata *dbmp;
2  io.c
@@ -1079,7 +1079,7 @@ static VALUE
1079 1079 rb_io_inspect(VALUE obj)
1080 1080 {
1081 1081 OpenFile *fptr;
1082   - char *buf, *cname, *st = "";
  1082 + char *cname, *st = "";
1083 1083
1084 1084 fptr = RFILE(rb_io_taint_check(obj))->fptr;
1085 1085 if (!fptr || !fptr->path) return rb_any_to_s(obj);
2  pack.c
@@ -2056,7 +2056,7 @@ utf8_to_uv(char *p, long *lenp)
2056 2056 rb_raise(rb_eArgError, "malformed UTF-8 character");
2057 2057 }
2058 2058 if (n > *lenp) {
2059   - rb_raise(rb_eArgError, "malformed UTF-8 character (expected %d bytes, given %d bytes)",
  2059 + rb_raise(rb_eArgError, "malformed UTF-8 character (expected %ld bytes, given %ld bytes)",
2060 2060 n, *lenp);
2061 2061 }
2062 2062 *lenp = n--;
20 parse.y
@@ -4379,9 +4379,6 @@ none : /* none */
4379 4379 # undef yylval
4380 4380 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
4381 4381
4382   -#ifndef RIPPER
4383   -static VALUE rb_parser_s_new _((void));
4384   -#endif
4385 4382 static int parser_regx_options _((struct parser_params*));
4386 4383 static int parser_tokadd_string _((struct parser_params*,int,int,int,long*));
4387 4384 static int parser_parse_string _((struct parser_params*,NODE*));
@@ -4531,7 +4528,6 @@ yycompile(parser, f, line)
4531 4528 int line;
4532 4529 {
4533 4530 int n;
4534   - NODE *node = 0;
4535 4531 struct RVarmap *vp, *vars = ruby_dyna_vars;
4536 4532 const char *kcode_save;
4537 4533
@@ -7397,7 +7393,7 @@ rb_backref_error(node)
7397 7393 {
7398 7394 switch (nd_type(node)) {
7399 7395 case NODE_NTH_REF:
7400   - rb_compile_error("Can't set variable $%d", node->nd_nth);
  7396 + rb_compile_error("Can't set variable $%ld", node->nd_nth);
7401 7397 break;
7402 7398 case NODE_BACK_REF:
7403 7399 rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
@@ -8077,20 +8073,6 @@ new_call(r,m,a)
8077 8073 }
8078 8074
8079 8075 static NODE*
8080   -fcall_gen(parser, m, a)
8081   - struct parser_params *parser;
8082   - ID m;
8083   - NODE *a;
8084   -{
8085   - if (is_local_id(m)) {
8086   - if ((dyna_in_block() && rb_dvar_defined(m)) || local_id(m)) {
8087   - return NEW_CALL(gettable(m), rb_intern("call"), a);
8088   - }
8089   - }
8090   - return NEW_FCALL(m,a);
8091   -}
8092   -
8093   -static NODE*
8094 8076 new_fcall_gen(parser, m, a)
8095 8077 struct parser_params *parser;
8096 8078 ID m;
2  signal.c
@@ -571,7 +571,7 @@ static VALUE
571 571 trap(struct trap_arg *arg)
572 572 {
573 573 sighandler_t func, oldfunc;
574   - VALUE command, tmp, oldcmd;
  574 + VALUE command, oldcmd;
575 575 int sig = -1;
576 576 char *s;
577 577
4 struct.c
@@ -48,7 +48,7 @@ rb_struct_members(VALUE s)
48 48 VALUE members = rb_struct_s_members(rb_obj_class(s));
49 49
50 50 if (RSTRUCT(s)->len != RARRAY(members)->len) {
51   - rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
  51 + rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
52 52 RARRAY(members)->len, RSTRUCT(s)->len);
53 53 }
54 54 return members;
@@ -583,7 +583,7 @@ rb_struct_aset_id(VALUE s, ID id, VALUE val)
583 583 rb_struct_modify(s);
584 584 len = RARRAY(members)->len;
585 585 if (RSTRUCT(s)->len != RARRAY(members)->len) {
586   - rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
  586 + rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
587 587 RARRAY(members)->len, RSTRUCT(s)->len);
588 588 }
589 589 for (i=0; i<len; i++) {
2  variable.c
@@ -1165,7 +1165,7 @@ rb_autoload(VALUE mod, ID id, const char *file)
1165 1165 struct st_table *tbl;
1166 1166
1167 1167 if (!rb_is_const_id(id)) {
1168   - rb_raise(rb_eNameError, "autoload must be constant name", rb_id2name(id));
  1168 + rb_raise(rb_eNameError, "autoload must be constant name: %s", rb_id2name(id));
1169 1169 }
1170 1170 if (!file || !*file) {
1171 1171 rb_raise(rb_eArgError, "empty file name");

0 comments on commit 0517b43

Please sign in to comment.
Something went wrong with that request. Please try again.