From d5814d58496ff1fbbb2e6727ff8bffe78204223c Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov <22344340+unspecd@users.noreply.github.com> Date: Sun, 3 Jan 2021 00:36:43 -0500 Subject: Fix compilation warnings (#1397) --- src/core/dialer.c | 3 +++ src/core/listener.c | 3 +++ src/supplemental/http/http_public.c | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/src/core/dialer.c b/src/core/dialer.c index 1f9a5e58..00d2c163 100644 --- a/src/core/dialer.c +++ b/src/core/dialer.c @@ -219,6 +219,9 @@ nni_dialer_bump_error(nni_dialer *d, int err) nni_stat_inc(&d->st_other, 1); break; } +#else + NNI_ARG_UNUSED(d); + NNI_ARG_UNUSED(err); #endif } diff --git a/src/core/listener.c b/src/core/listener.c index 13d5c6a6..32aa65ed 100644 --- a/src/core/listener.c +++ b/src/core/listener.c @@ -209,6 +209,9 @@ nni_listener_bump_error(nni_listener *l, int err) nni_stat_inc(&l->st_other, 1); break; } +#else + NNI_ARG_UNUSED(l); + NNI_ARG_UNUSED(err); #endif } diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index 7900aa7f..e493a994 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -608,6 +608,9 @@ nng_http_handler_collect_body(nng_http_handler *h, bool want, size_t len) nni_http_handler_collect_body(h, want, len); return (0); #else + NNI_ARG_UNUSED(h); + NNI_ARG_UNUSED(want); + NNI_ARG_UNUSED(len); return (NNG_ENOTSUP); #endif } @@ -926,6 +929,8 @@ nng_http_req_reset(nng_http_req *req) { #ifdef NNG_SUPP_HTTP nni_http_req_reset(req); +#else + NNI_ARG_UNUSED(req); #endif } @@ -934,5 +939,7 @@ nng_http_res_reset(nng_http_res *res) { #ifdef NNG_SUPP_HTTP nni_http_res_reset(res); +#else + NNI_ARG_UNUSED(res); #endif } -- cgit v1.2.3-70-g09d2