diff --git a/src/core/iomgr/iocp_windows.c b/src/core/iomgr/iocp_windows.c index d3868ce62cb..65e371842f5 100644 --- a/src/core/iomgr/iocp_windows.c +++ b/src/core/iomgr/iocp_windows.c @@ -67,7 +67,7 @@ static DWORD deadline_to_millis_timeout(gpr_timespec deadline, return 0; } timeout = gpr_time_sub(deadline, now); - return gpr_time_to_millis(gpr_time_add( + return (DWORD)gpr_time_to_millis(gpr_time_add( timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); } @@ -179,11 +179,9 @@ void grpc_iocp_add_socket(grpc_winsocket *socket) { static void socket_notify_on_iocp(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, grpc_closure *closure, grpc_winsocket_callback_info *info) { - int run_now = 0; GPR_ASSERT(info->closure == NULL); gpr_mu_lock(&socket->state_mu); if (info->has_pending_iocp) { - run_now = 1; info->has_pending_iocp = 0; grpc_exec_ctx_enqueue(exec_ctx, closure, 1); } else { diff --git a/src/core/iomgr/tcp_windows.c b/src/core/iomgr/tcp_windows.c index cc7f7ff8d26..f09588cc217 100644 --- a/src/core/iomgr/tcp_windows.c +++ b/src/core/iomgr/tcp_windows.c @@ -143,10 +143,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, int success) { grpc_closure *cb = tcp->read_cb; grpc_winsocket *socket = tcp->socket; gpr_slice sub; - gpr_slice *slice = NULL; - size_t nslices = 0; grpc_winsocket_callback_info *info = &socket->read_info; - int do_abort = 0; if (success) { if (socket->read_info.wsa_error != 0 && !tcp->shutting_down) { @@ -238,7 +235,6 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, int success) { grpc_winsocket *handle = tcp->socket; grpc_winsocket_callback_info *info = &handle->write_info; grpc_closure *cb; - int do_abort = 0; gpr_mu_lock(&tcp->mu); cb = tcp->write_cb; diff --git a/src/core/support/env_win32.c b/src/core/support/env_win32.c index 8d2c61ae4ce..10258283baf 100644 --- a/src/core/support/env_win32.c +++ b/src/core/support/env_win32.c @@ -38,7 +38,12 @@ #include "src/core/support/env.h" #include "src/core/support/string.h" +#ifdef __MINGW32__ +errno_t getenv_s(size_t *size_needed, char *buffer, size_t size, + const char *varname); +#else #include +#endif #include #include