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

ruby-changes:10817

From: nobu <ko1@a...>
Date: Wed, 18 Feb 2009 03:14:28 +0900 (JST)
Subject: [ruby-changes:10817] Ruby:r22385 (trunk): * ext/socket/option.c: suppress warnings.

nobu	2009-02-18 03:14:20 +0900 (Wed, 18 Feb 2009)

  New Revision: 22385

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

  Log:
    * ext/socket/option.c: suppress warnings.

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

Index: ext/socket/option.c
===================================================================
--- ext/socket/option.c	(revision 22384)
+++ ext/socket/option.c	(revision 22385)
@@ -233,6 +233,7 @@
     }
 }
 
+#if defined(IPV6_MULTICAST_IF) || defined(IPV6_MULTICAST_LOOP)
 static int
 inspect_uint(int level, int optname, VALUE data, VALUE ret)
 {
@@ -246,6 +247,7 @@
         return 0;
     }
 }
+#endif
 
 #if defined(SOL_SOCKET) && defined(SO_LINGER) /* POSIX */
 static int
@@ -305,7 +307,8 @@
     if (RSTRING_LEN(data) == sizeof(struct ucred)) {
         struct ucred cred;
         memcpy(&cred, RSTRING_PTR(data), sizeof(struct ucred));
-        rb_str_catf(ret, " pid=%u euid=%u egid=%u", cred.pid, cred.uid, cred.gid);
+        rb_str_catf(ret, " pid=%u euid=%u egid=%u",
+		    (unsigned)cred.pid, (unsigned)cred.uid, (unsigned)cred.gid);
         rb_str_cat2(ret, " (ucred)");
         return 1;
     }

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

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