From cb6aea9aa932b76fd0a57d7ace711c66c5d280f5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 6 Oct 2021 21:28:00 +0900 Subject: [PATCH] Compile with -DNDEBUG --- lib/nghttp2_map.c | 1 + src/h2load_quic.cc | 1 + src/shrpx_http3_upstream.cc | 1 + src/shrpx_mruby.cc | 1 + src/shrpx_worker.cc | 1 + 5 files changed, 5 insertions(+) diff --git a/lib/nghttp2_map.c b/lib/nghttp2_map.c index 5aab90b4..e5db168c 100644 --- a/lib/nghttp2_map.c +++ b/lib/nghttp2_map.c @@ -189,6 +189,7 @@ static int map_resize(nghttp2_map *map, uint32_t new_tablelen, nghttp2_map_bucket *new_table; nghttp2_map_bucket *bkt; int rv; + (void)rv; new_table = nghttp2_mem_calloc(map->mem, new_tablelen, sizeof(nghttp2_map_bucket)); diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index ff63ff54..b77bf6ce 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -451,6 +451,7 @@ void Client::quic_close_connection() { break; default: assert(0); + abort(); } if (nwrite < 0) { diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index ea73d0ee..aa0d1f8c 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -1842,6 +1842,7 @@ int Http3Upstream::http_acked_stream_data(Downstream *downstream, auto body = downstream->get_response_buf(); auto drained = body->drain_mark(datalen); + (void)drained; assert(datalen == drained); diff --git a/src/shrpx_mruby.cc b/src/shrpx_mruby.cc index 5f7c42ad..b5c6ed3c 100644 --- a/src/shrpx_mruby.cc +++ b/src/shrpx_mruby.cc @@ -75,6 +75,7 @@ int MRubyContext::run_app(Downstream *downstream, int phase) { break; default: assert(0); + abort(); } auto res = mrb_funcall(mrb_, app_, method, 1, env_); diff --git a/src/shrpx_worker.cc b/src/shrpx_worker.cc index 255bca62..a0107cc9 100644 --- a/src/shrpx_worker.cc +++ b/src/shrpx_worker.cc @@ -1036,6 +1036,7 @@ const UpstreamAddr *Worker::find_quic_upstream_addr(const Address &local_addr) { break; default: assert(0); + abort(); } std::array hostport_buf;