summaryrefslogtreecommitdiff
path: root/ext/socket/unixsocket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-11 12:30:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-11 12:30:39 +0000
commit8a7aad995210ce7a66e9be4315693feb7756670a (patch)
treedb5cbd6b650d594bb2b1d449f8742dbc358d9f3e /ext/socket/unixsocket.c
parenta5eb40b99935a5d1bc29e2c086d00883d6b98858 (diff)
* fix type warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/unixsocket.c')
-rw-r--r--ext/socket/unixsocket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 82893ab..25a2c1e 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -339,7 +339,7 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
rb_sys_fail("recvmsg(2)");
#if FD_PASSING_BY_MSG_CONTROL
- if (arg.msg.msg_controllen < sizeof(struct cmsghdr)) {
+ if (arg.msg.msg_controllen < (socklen_t)sizeof(struct cmsghdr)) {
rb_raise(rb_eSocket,
"file descriptor was not passed (msg_controllen=%d smaller than sizeof(struct cmsghdr)=%d)",
(int)arg.msg.msg_controllen, (int)sizeof(struct cmsghdr));
@@ -354,12 +354,12 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
"file descriptor was not passed (cmsg_type=%d, %d expected)",
cmsg.hdr.cmsg_type, SCM_RIGHTS);
}
- if (arg.msg.msg_controllen < CMSG_LEN(sizeof(int))) {
+ if (arg.msg.msg_controllen < (socklen_t)CMSG_LEN(sizeof(int))) {
rb_raise(rb_eSocket,
"file descriptor was not passed (msg_controllen=%d smaller than CMSG_LEN(sizeof(int))=%d)",
(int)arg.msg.msg_controllen, (int)CMSG_LEN(sizeof(int)));
}
- if (CMSG_SPACE(sizeof(int)) < arg.msg.msg_controllen) {
+ if ((socklen_t)CMSG_SPACE(sizeof(int)) < arg.msg.msg_controllen) {
rb_raise(rb_eSocket,
"file descriptor was not passed (msg_controllen=%d bigger than CMSG_SPACE(sizeof(int))=%d)",
(int)arg.msg.msg_controllen, (int)CMSG_SPACE(sizeof(int)));