From 3cedf14c3586b0770cb9ee62c75f922ab2006153 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 7 Jul 2017 18:41:56 -0700 Subject: SRWLocks FTW! Modern Windows (Vista and later) have light weight Slim Read/Write locks which only occupy 64 bits, and don't require any memory allocation to create. While here clean up a few more unreferenced variables found with the Microsoft compilers. --- src/core/socket.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/core/socket.c') diff --git a/src/core/socket.c b/src/core/socket.c index 66f5c63b..f7712aa3 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -472,7 +472,6 @@ nni_sock_shutdown(nni_sock *sock) nni_pipe *pipe; nni_ep *ep; nni_time linger; - int i; nni_mtx_lock(&sock->s_mx); if (sock->s_closing) { @@ -577,8 +576,6 @@ nni_sock_shutdown(nni_sock *sock) int nni_sock_ep_add(nni_sock *sock, nni_ep *ep) { - int rv; - nni_mtx_lock(&sock->s_mx); if (sock->s_closing) { nni_mtx_unlock(&sock->s_mx); @@ -613,9 +610,6 @@ nni_sock_ep_remove(nni_sock *sock, nni_ep *ep) void nni_sock_close(nni_sock *sock) { - int i; - nni_notify *notify; - // Shutdown everything if not already done. This operation // is idempotent. nni_sock_shutdown(sock); -- cgit v1.2.3-70-g09d2