Skip to content

Commit

Permalink
Fix compilation warnings (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
unspecd authored Jan 3, 2021
1 parent 6d5fcbb commit d5814d5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/dialer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 3 additions & 0 deletions src/core/listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
7 changes: 7 additions & 0 deletions src/supplemental/http/http_public.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

0 comments on commit d5814d5

Please sign in to comment.