Skip to content
Browse files

banish some warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 8a6eb88 commit 0517b43c5b58ccc2acddea80cdfa4e16e19aa84d @akr akr committed Sep 24, 2005
Showing with 8 additions and 32 deletions.
  1. +1 −1 array.c
  2. +0 −1 ext/dbm/dbm.c
  3. +0 −1 ext/dl/handle.c
  4. +0 −1 ext/gdbm/gdbm.c
  5. +0 −1 ext/openssl/ossl_ssl.c
  6. +0 −1 ext/readline/readline.c
  7. +0 −1 ext/sdbm/init.c
  8. +1 −1 io.c
  9. +1 −1 pack.c
  10. +1 −19 parse.y
  11. +1 −1 signal.c
  12. +2 −2 struct.c
  13. +1 −1 variable.c
View
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++) {
View
1 ext/dbm/dbm.c
@@ -242,7 +242,6 @@ fdbm_select(obj)
VALUE obj;
{
VALUE new = rb_ary_new();
- int i;
datum key, val;
DBM *dbm;
struct dbmdata *dbmp;
View
1 ext/dl/handle.c
@@ -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;
View
1 ext/gdbm/gdbm.c
@@ -338,7 +338,6 @@ fgdbm_select(obj)
VALUE obj;
{
VALUE new = rb_ary_new();
- int i;
GDBM_FILE dbm;
struct dbmdata *dbmp;
VALUE keystr;
View
1 ext/openssl/ossl_ssl.c
@@ -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);
View
1 ext/readline/readline.c
@@ -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) {
View
1 ext/sdbm/init.c
@@ -219,7 +219,6 @@ fsdbm_select(obj)
VALUE obj;
{
VALUE new = rb_ary_new();
- int i;
datum key, val;
DBM *dbm;
struct dbmdata *dbmp;
View
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);
View
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--;
View
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);
@@ -8077,20 +8073,6 @@ 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;
ID m;
View
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;
View
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++) {
View
2 variable.c
@@ -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");

0 comments on commit 0517b43

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