summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:47 +0000
commit7e4a95cd062ac961a91b7b7185b75c103bc7496d (patch)
tree394e3867a600281e02902694934f03d16dcddcd1 /ext/socket/socket.c
parentcb302bf35109d69063ac589dd75f6356257a7fda (diff)
downloadruby-7e4a95cd062ac961a91b7b7185b75c103bc7496d.tar.gz
socket.c: suppress warnings
* ext/socket/socket.c (rsock_sys_fail_sockaddr): cast down explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index d05e5a3e42..059011669a 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -53,7 +53,7 @@ rsock_sys_fail_sockaddr(const char *mesg, VALUE addr)
rai = rsock_addrinfo_new(
(struct sockaddr *)RSTRING_PTR(addr),
- RSTRING_LEN(addr),
+ (socklen_t)RSTRING_LEN(addr), /* overflow should be checked already */
PF_UNSPEC, 0, 0, Qnil, Qnil);
rsock_sys_fail_addrinfo(mesg, rai);