aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/fd_posix_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/iomgr/fd_posix_test.c')
-rw-r--r--test/core/iomgr/fd_posix_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c
index 8bba87d61f..75959069c0 100644
--- a/test/core/iomgr/fd_posix_test.c
+++ b/test/core/iomgr/fd_posix_test.c
@@ -83,7 +83,8 @@ static void create_test_socket(int port, int *socket_fd,
/* Use local address for test */
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = htonl(0x7f000001);
- sin->sin_port = htons(port);
+ GPR_ASSERT(port >= 0 && port < 65536);
+ sin->sin_port = htons((gpr_uint16)port);
}
/* Dummy gRPC callback */
@@ -419,7 +420,7 @@ static void test_grpc_fd_change(void) {
int flags;
int sv[2];
char data;
- int result;
+ ssize_t result;
grpc_iomgr_closure first_closure;
grpc_iomgr_closure second_closure;