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

ruby-changes:28545

From: akr <ko1@a...>
Date: Tue, 7 May 2013 12:13:02 +0900 (JST)
Subject: [ruby-changes:28545] akr:r40597 (trunk): * ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as

akr	2013-05-07 12:12:32 +0900 (Tue, 07 May 2013)

  New Revision: 40597

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

  Log:
    * ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
      int.  This suppress a warning.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/socket.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40596)
+++ ChangeLog	(revision 40597)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue May  7 12:10:52 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
+	  int.  This suppress a warning.
+
 Tue May  7 12:09:29 2013  Tanaka Akira  <akr@f...>
 
 	* ext/socket/extconf.rb: Set close_fds false for Cygwin.
Index: ext/socket/socket.c
===================================================================
--- ext/socket/socket.c	(revision 40596)
+++ ext/socket/socket.c	(revision 40597)
@@ -1759,7 +1759,7 @@ socket_s_ip_address_list(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1759
 #elif defined(SIOCGIFCONF)
     int fd = -1;
     int ret;
-#define EXTRA_SPACE (sizeof(struct ifconf) + sizeof(union_sockaddr))
+#define EXTRA_SPACE ((int)(sizeof(struct ifconf) + sizeof(union_sockaddr)))
     char initbuf[4096+EXTRA_SPACE];
     char *buf = initbuf;
     int bufsize;

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

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