summaryrefslogtreecommitdiffstats
path: root/ext
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
commit59c1c38662070a08dd7fd0151d104586534bcd1b (patch)
tree15df57c98b80b45fcf342804222769f93821ee45 /ext
parent074e66f080b53f05016224700c8c4044b835663c (diff)
downloadruby-59c1c38662070a08dd7fd0151d104586534bcd1b.tar.gz
ruby-59c1c38662070a08dd7fd0151d104586534bcd1b.tar.xz
ruby-59c1c38662070a08dd7fd0151d104586534bcd1b.zip
* ext/socket/option.c: suppress warnings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 5be3eb5e4..caac0abb2 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;
}