ruby-changes:14951
From: nobu <ko1@a...>
Date: Fri, 5 Mar 2010 17:51:30 +0900 (JST)
Subject: [ruby-changes:14951] Ruby:r26822 (trunk): * io.c (pipe_open): suppressed a warning.
nobu 2010-03-05 17:51:12 +0900 (Fri, 05 Mar 2010) New Revision: 26822 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26822 Log: * io.c (pipe_open): suppressed a warning. * win32/win32.c (rb_w32_map_errno, winnt_stat, rb_chsize): ditto. * win32/win32.c (rb_w32_aspawn): get rid of overflow. Modified files: trunk/ChangeLog trunk/io.c trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26821) +++ ChangeLog (revision 26822) @@ -1,3 +1,11 @@ +Fri Mar 5 17:51:09 2010 Nobuyoshi Nakada <nobu@r...> + + * io.c (pipe_open): suppressed a warning. + + * win32/win32.c (rb_w32_map_errno, winnt_stat, rb_chsize): ditto. + + * win32/win32.c (rb_w32_aspawn): get rid of overflow. + Fri Mar 5 11:59:30 2010 Nobuyoshi Nakada <nobu@r...> * win32/win32.c (signbit): defined on mingw. Index: io.c =================================================================== --- io.c (revision 26821) +++ io.c (revision 26822) @@ -5006,7 +5006,7 @@ if (argc) { int i; - if (argc >= FIXNUM_MAX / sizeof(char *)) { + if (argc >= (int)(FIXNUM_MAX / sizeof(char *))) { rb_raise(rb_eArgError, "too many arguments"); } argbuf = rb_str_tmp_new((argc+1) * sizeof(char *)); Index: win32/win32.c =================================================================== --- win32/win32.c (revision 26821) +++ win32/win32.c (revision 26822) @@ -181,7 +181,7 @@ return 0; } - for (i = 0; i < sizeof(errmap) / sizeof(*errmap); i++) { + for (i = 0; i < (int)(sizeof(errmap) / sizeof(*errmap)); i++) { if (errmap[i].winerr == winerr) { return errmap[i].err; } @@ -1115,7 +1115,8 @@ rb_pid_t rb_w32_aspawn(int mode, const char *prog, char *const *argv) { - int len, c_switch = 0; + int c_switch = 0; + size_t len; BOOL ntcmd = FALSE, tmpnt; const char *shell; char *cmd, fbuf[MAXPATHLEN]; @@ -3975,7 +3976,7 @@ // If runtime stat(2) is called for network shares, it fails on WinNT. // Because GetDriveType returns 1 for network shares. (Win98 returns 4) DWORD attr = GetFileAttributes(path); - if (attr == -1) { + if (attr == (DWORD)-1L) { errno = map_errno(GetLastError()); return -1; } @@ -4091,7 +4092,7 @@ end = ((off_t)uend << 32) | (unsigned long)lend; usize = (long)(size >> 32); lsize = (long)size; - if (SetFilePointer(h, lsize, &usize, SEEK_SET) == -1L && + if (SetFilePointer(h, lsize, &usize, SEEK_SET) == (DWORD)-1L && (e = GetLastError())) { errno = map_errno(e); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/