mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/option.c: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e4b129b56
commit
da97071549
1 changed files with 4 additions and 1 deletions
|
@ -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
|
static int
|
||||||
inspect_uint(int level, int optname, VALUE data, VALUE ret)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SOL_SOCKET) && defined(SO_LINGER) /* POSIX */
|
#if defined(SOL_SOCKET) && defined(SO_LINGER) /* POSIX */
|
||||||
static int
|
static int
|
||||||
|
@ -305,7 +307,8 @@ inspect_peercred(int level, int optname, VALUE data, VALUE ret)
|
||||||
if (RSTRING_LEN(data) == sizeof(struct ucred)) {
|
if (RSTRING_LEN(data) == sizeof(struct ucred)) {
|
||||||
struct ucred cred;
|
struct ucred cred;
|
||||||
memcpy(&cred, RSTRING_PTR(data), sizeof(struct ucred));
|
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)");
|
rb_str_cat2(ret, " (ucred)");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue