From 49185a8f7865ff62f64338bfec944f31534842ae Mon Sep 17 00:00:00 2001 From: wkubiak Date: Mon, 27 Apr 2015 15:20:34 +0200 Subject: [PATCH 1/2] removed unused variables --- src/core/iomgr/resolve_address_windows.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/iomgr/resolve_address_windows.c b/src/core/iomgr/resolve_address_windows.c index ac31dadd9d7..9b416dfe8aa 100644 --- a/src/core/iomgr/resolve_address_windows.c +++ b/src/core/iomgr/resolve_address_windows.c @@ -65,7 +65,6 @@ grpc_resolved_addresses *grpc_blocking_resolve_address( int s; size_t i; grpc_resolved_addresses *addrs = NULL; - const gpr_timespec start_time = gpr_now(); /* parse name, splitting it into host and port parts */ gpr_split_host_port(name, &host, &port); @@ -108,9 +107,6 @@ grpc_resolved_addresses *grpc_blocking_resolve_address( } { - const gpr_timespec delay = gpr_time_sub(gpr_now(), start_time); - const int delay_ms = - delay.tv_sec * GPR_MS_PER_SEC + delay.tv_nsec / GPR_NS_PER_MS; for (i = 0; i < addrs->naddrs; i++) { char *buf; grpc_sockaddr_to_string(&buf, (struct sockaddr *)&addrs->addrs[i].addr, From 0d20f42c933902aadf4f56ebd8747ff5d70327c1 Mon Sep 17 00:00:00 2001 From: wkubiak Date: Mon, 27 Apr 2015 15:38:44 +0200 Subject: [PATCH 2/2] fix comparison between pointer and integer error --- src/core/iomgr/tcp_server_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index 6e10da97ccb..fe92846a716 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -192,7 +192,7 @@ static void start_accept(server_port *port) { } /* TODO(jtattermusch): probably a race here, we regularly get use-after-free on server shutdown */ - GPR_ASSERT(port->socket != 0xfeeefeee); + GPR_ASSERT(port->socket != (grpc_winsocket*)0xfeeefeee); success = port->AcceptEx(port->socket->socket, sock, port->addresses, 0, addrlen, addrlen, &bytes_received, &port->socket->read_info.overlapped);