From 2b785b0f3e4f902e7de29a895d1f6ae0f10c3265 Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 6 Jun 2008 10:39:57 +0000 Subject: Merge changes from ruby_1_8 to reduce warnings and potentially improve security. * mkconfig.rb: hide build path from rbconfig.rb. * util.c (ruby_strtod, dtoa): initialize more variables for error handling. * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), (path2class, path2module): constified. * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 642c5982a6..c41924dbbf 100644 --- a/process.c +++ b/process.c @@ -1024,9 +1024,11 @@ int rb_proc_exec(str) const char *str; { +#ifndef _WIN32 const char *s = str; char *ss, *t; char **argv, **a; +#endif while (*str && ISSPACE(*str)) str++; @@ -1089,7 +1091,9 @@ proc_spawn_v(argv, prog) char **argv; char *prog; { +#if defined(__human68k__) char *extension; +#endif int status; if (!prog) @@ -1405,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; @@ -1650,7 +1654,9 @@ rb_f_sleep(argc, argv) static VALUE proc_getpgrp() { +#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID) int pgrp; +#endif rb_secure(2); #if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID) -- cgit v1.2.3