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

ruby-changes:30752

From: nobu <ko1@a...>
Date: Wed, 4 Sep 2013 23:41:48 +0900 (JST)
Subject: [ruby-changes:30752] nobu:r42831 (trunk): win32.c: suppress warning

nobu	2013-09-04 23:41:38 +0900 (Wed, 04 Sep 2013)

  New Revision: 42831

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

  Log:
    win32.c: suppress warning
    
    * win32/win32.c (do_select): unconstify timeout as select() declares
      it non-const.

  Modified files:
    trunk/win32/win32.c
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 42830)
+++ win32/win32.c	(revision 42831)
@@ -2766,7 +2766,7 @@ is_invalid_handle(SOCKET sock) https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L2766
 /* License: Artistic or GPL */
 static int
 do_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
-	  const struct timeval *timeout)
+	  struct timeval *timeout)
 {
     int r = 0;
 
@@ -2911,7 +2911,7 @@ rb_w32_select_with_thread(int nfds, fd_s https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L2911
     {
 	struct timeval rest;
 	const struct timeval wait = {0, 10 * 1000}; // 10ms
-	const struct timeval zero = {0, 0};         // 0ms
+	struct timeval zero = {0, 0};		    // 0ms
 	for (;;) {
 	    if (th && rb_w32_check_interrupt(th) != WAIT_TIMEOUT) {
 		r = -1;

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

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