From 9949407fd90c1c5bfe332141c75db995a9b867aa Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 19 Oct 2015 16:28:56 +0000 Subject: [PATCH] suppress a warning * ext/socket/raddrinfo.c (rsock_fd_family): suppress a sign-compare warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/raddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 5bdde2584a..237055df8f 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -525,7 +525,7 @@ rsock_fd_family(int fd) socklen_t sa_len = sizeof(sa); if (fd < 0 || getsockname(fd, &sa, &sa_len) != 0 || - sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) { + (size_t)sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) { return AF_UNSPEC; } return sa.sa_family;