ruby-changes:8364
From: usa <ko1@a...>
Date: Thu, 23 Oct 2008 09:28:10 +0900 (JST)
Subject: [ruby-changes:8364] Ruby:r19894 (trunk): * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of
usa 2008-10-23 09:27:52 +0900 (Thu, 23 Oct 2008) New Revision: 19894 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19894 Log: * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of warning. Modified files: trunk/ChangeLog trunk/ext/socket/socket.c Index: ChangeLog =================================================================== --- ChangeLog (revision 19893) +++ ChangeLog (revision 19894) @@ -1,3 +1,8 @@ +Thu Oct 23 09:26:22 2008 NAKAMURA Usaku <usa@r...> + + * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of + warning. + Thu Oct 23 08:06:03 2008 Yukihiro Matsumoto <matz@r...> * ext/socket/socket.c (sock_s_getservbyport): port should be Index: ext/socket/socket.c =================================================================== --- ext/socket/socket.c (revision 19893) +++ ext/socket/socket.c (revision 19894) @@ -3254,7 +3254,7 @@ if (NIL_P(proto)) proto = rb_str_new2("tcp"); StringValue(proto); - sp = getservbyport(htons(NUM2INT(port)), StringValueCStr(proto)); + sp = getservbyport(htons((uint16_t)NUM2INT(port)), StringValueCStr(proto)); if (!sp) { rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING_PTR(proto)); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/