From da97071549496807cedae46a2b81d68407fed2fe Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 17 Feb 2009 18:14:20 +0000 Subject: * ext/socket/option.c: suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/option.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/socket/option.c b/ext/socket/option.c index 5be3eb5e4c..caac0abb26 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -233,6 +233,7 @@ inspect_int(int level, int optname, VALUE data, VALUE ret) } } +#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 @@ inspect_uint(int level, int optname, VALUE data, VALUE ret) return 0; } } +#endif #if defined(SOL_SOCKET) && defined(SO_LINGER) /* POSIX */ static int @@ -305,7 +307,8 @@ inspect_peercred(int level, int optname, VALUE data, VALUE ret) 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; } -- cgit v1.2.3