[前][次][番号順一覧][スレッド一覧]

ruby-changes:21572

From: nobu <ko1@a...>
Date: Thu, 3 Nov 2011 22:51:26 +0900 (JST)
Subject: [ruby-changes:21572] nobu:r33621 (trunk): * thread.c (rb_fd_rcopy): suppress warnings on mingw32.

nobu	2011-11-03 22:50:55 +0900 (Thu, 03 Nov 2011)

  New Revision: 33621

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33621

  Log:
    * thread.c (rb_fd_rcopy): suppress warnings on mingw32.
    
    * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, dupfd):
      ditto.

  Modified files:
    trunk/thread.c
    trunk/win32/win32.c

Index: thread.c
===================================================================
--- thread.c	(revision 33620)
+++ thread.c	(revision 33621)
@@ -2471,7 +2471,7 @@
 
     /* we assume src is the result of select() with dst, so dst should be
      * larger or equal than src. */
-    if (max > FD_SETSIZE || max > dst->fd_count) {
+    if (max > FD_SETSIZE || (UINT)max > dst->fd_count) {
 	rb_raise(rb_eArgError, "too large fdsets");
     }
 
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 33620)
+++ win32/win32.c	(revision 33621)
@@ -3147,7 +3147,7 @@
 {
     int r;
     int ret;
-    int mode;
+    int mode = 0;
     DWORD flg;
     WSAOVERLAPPED wol;
     WSABUF wbuf;
@@ -3282,7 +3282,7 @@
     static WSARecvMsg_t pWSARecvMsg = NULL;
     WSAMSG wsamsg;
     SOCKET s;
-    int mode;
+    int mode = 0;
     DWORD len;
     int ret;
 
@@ -3340,7 +3340,7 @@
     static WSASendMsg_t pWSASendMsg = NULL;
     WSAMSG wsamsg;
     SOCKET s;
-    int mode;
+    int mode = 0;
     DWORD len;
     int ret;
 
@@ -3811,7 +3811,7 @@
 	    goto close_fds_and_return;
 	}
 	fds[filled++] = ret;
-    } while (filled < (sizeof(fds)/sizeof(fds[0])));
+    } while (filled < (int)numberof(fds));
 
     ret = dupfd(hDup, flags, minfd);
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]