diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-01 20:28:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-01 20:28:01 +0000 |
commit | 4940cff399c8c350f43d9151a8c23295e9a6f9d4 (patch) | |
tree | 1e9a08f7eae3d31b345674277cc253eb443085fd | |
parent | 9ed3d64d1d3e0fd60c9a65d621efdf66c59b0d9d (diff) |
* io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique),
(path2class, path2module): constified.
* pack.c (pack_unpack), process.c (rb_syswait): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | marshal.c | 10 | ||||
-rw-r--r-- | pack.c | 10 | ||||
-rw-r--r-- | process.c | 6 |
5 files changed, 18 insertions, 17 deletions
@@ -1,3 +1,10 @@ +Mon Jun 2 05:27:58 2008 Nobuyoshi Nakada <[email protected]> + + * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), + (path2class, path2module): constified. + + * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. + Mon Jun 2 04:55:05 2008 Nobuyoshi Nakada <[email protected]> * suppress warnings on cygwin, mingw and mswin. @@ -1681,7 +1681,7 @@ rb_io_getline_fast(fptr, delim) static int rscheck(rsptr, rslen, rs) - char *rsptr; + const char *rsptr; long rslen; VALUE rs; { @@ -130,7 +130,7 @@ static void w_long _((long, struct dump_arg*)); static void w_nbyte(s, n, arg) - char *s; + const char *s; int n; struct dump_arg *arg; { @@ -153,7 +153,7 @@ w_byte(c, arg) static void w_bytes(s, n, arg) - char *s; + const char *s; int n; struct dump_arg *arg; { @@ -354,7 +354,7 @@ w_symbol(id, arg) static void w_unique(s, arg) - char *s; + const char *s; struct dump_arg *arg; { if (s[0] == '#') { @@ -991,7 +991,7 @@ r_ivar(obj, arg) static VALUE path2class(path) - char *path; + const char *path; { VALUE v = rb_path2class(path); @@ -1003,7 +1003,7 @@ path2class(path) static VALUE path2module(path) - char *path; + const char *path; { VALUE v = rb_path2class(path); @@ -1884,8 +1884,8 @@ pack_unpack(str, fmt) case 'P': if (sizeof(char *) <= send - s) { + VALUE tmp = Qnil; char *t; - VALUE tmp; memcpy(&t, s, sizeof(char *)); s += sizeof(char *); @@ -1915,9 +1915,6 @@ pack_unpack(str, fmt) rb_raise(rb_eArgError, "non associated pointer"); } } - else { - tmp = Qnil; - } rb_ary_push(ary, tmp); } break; @@ -1929,7 +1926,7 @@ pack_unpack(str, fmt) if (send - s < sizeof(char *)) break; else { - VALUE tmp; + VALUE tmp = Qnil; char *t; memcpy(&t, s, sizeof(char *)); @@ -1954,9 +1951,6 @@ pack_unpack(str, fmt) rb_raise(rb_eArgError, "non associated pointer"); } } - else { - tmp = Qnil; - } rb_ary_push(ary, tmp); } } @@ -1409,12 +1409,12 @@ rb_syswait(pid) { static int overriding; #ifdef SIGHUP - RETSIGTYPE (*hfunc)_((int)); + RETSIGTYPE (*hfunc)_((int)) = 0; #endif #ifdef SIGQUIT - RETSIGTYPE (*qfunc)_((int)); + RETSIGTYPE (*qfunc)_((int)) = 0; #endif - RETSIGTYPE (*ifunc)_((int)); + RETSIGTYPE (*ifunc)_((int)) = 0; int status; int i, hooked = Qfalse; |