From 45bc175ef9278c175d2fc3a0678b49b18e74c449 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Feb 2018 14:50:04 -0800 Subject: fixes #234 Investigate enabling more verbose compiler warnings We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need. --- src/platform/windows/win_tcp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/platform/windows/win_tcp.c') diff --git a/src/platform/windows/win_tcp.c b/src/platform/windows/win_tcp.c index 6d58d495..20f324b3 100644 --- a/src/platform/windows/win_tcp.c +++ b/src/platform/windows/win_tcp.c @@ -265,6 +265,8 @@ nni_plat_tcp_ep_init(nni_plat_tcp_ep **epp, const nni_sockaddr *lsa, GUID guid2 = WSAID_ACCEPTEX; GUID guid3 = WSAID_GETACCEPTEXSOCKADDRS; + NNI_ARG_UNUSED(mode); + if ((ep = NNI_ALLOC_STRUCT(ep)) == NULL) { return (NNG_ENOMEM); } @@ -481,6 +483,8 @@ nni_win_tcp_acc_start(nni_win_event *evt, nni_aio *aio) SOCKET acc_s; DWORD cnt; + NNI_ARG_UNUSED(aio); + acc_s = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP); if (acc_s == INVALID_SOCKET) { evt->status = nni_win_error(GetLastError()); @@ -576,6 +580,8 @@ nni_win_tcp_con_start(nni_win_event *evt, nni_aio *aio) int rv; int family; + NNI_ARG_UNUSED(aio); + if (ep->loclen > 0) { family = ep->locaddr.ss_family; } else { -- cgit v1.2.3-70-g09d2