Skip to content

Commit fae873f

Browse files
committed
♻️ #233 try to fix unused variable warnings
1 parent bf5d88e commit fae873f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/c/ngx_http_clojure_module.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,9 @@ static ngx_int_t ngx_http_clojure_body_filter(ngx_http_request_t *r, ngx_chain_
21932193
* where the return value of log handler will be ignored.
21942194
*/
21952195
static ngx_int_t ngx_http_clojure_log_handler(ngx_http_request_t * r) {
2196+
#if (NGX_DEBUG)
21962197
ngx_int_t rc;
2198+
#endif
21972199
ngx_http_clojure_module_ctx_t *ctx;
21982200
ngx_http_clojure_loc_conf_t *lcf = ngx_http_get_module_loc_conf(r, ngx_http_clojure_module);
21992201

@@ -2213,15 +2215,22 @@ static ngx_int_t ngx_http_clojure_log_handler(ngx_http_request_t * r) {
22132215

22142216
ngx_http_clojure_init_ctx(ctx, NGX_HTTP_LOG_PHASE, r);
22152217
ngx_http_set_ctx(r, ctx, ngx_http_clojure_module);
2218+
#if (NGX_DEBUG)
22162219
rc = ngx_http_clojure_eval(lcf->log_handler_id, r, 0);
2217-
22182220
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ngx_http_clojure_global_cycle->log, 0, "ngx clojure log (null ctx) request: %" PRIu64 ", rc: %d", (jlong)(uintptr_t)r, rc);
2221+
#else
2222+
(void)ngx_http_clojure_eval(lcf->log_handler_id, r, 0);
2223+
#endif
22192224
return NGX_OK;
22202225
} else {
22212226
ctx->hijacked_or_async = 0;
22222227
ctx->phase = NGX_HTTP_LOG_PHASE;
2228+
#if (NGX_DEBUG)
22232229
rc = ngx_http_clojure_eval(lcf->log_handler_id, r, 0);
22242230
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ngx_http_clojure_global_cycle->log, 0, "ngx clojure log (else) request: %" PRIu64 ", rc: %d", (jlong)(uintptr_t)r, rc);
2231+
#else
2232+
(void)ngx_http_clojure_eval(lcf->log_handler_id, r, 0);
2233+
#endif
22252234
return NGX_OK;
22262235
}
22272236

0 commit comments

Comments
 (0)