summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-17 18:14:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-17 18:14:20 +0000
commitda97071549496807cedae46a2b81d68407fed2fe (patch)
tree15df57c98b80b45fcf342804222769f93821ee45
parent3e4b129b568a3c8ca2c0bb53f86453f6fa10012f (diff)
* ext/socket/option.c: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/socket/option.c5
1 files changed, 4 insertions, 1 deletions
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;
}