Skip to content

Commit

Permalink
bugfix: fixed compilation errors when building without SSL.
Browse files Browse the repository at this point in the history
lua-nginx-module/src/ngx_http_lua_balancer.c: In function ‘ngx_http_lua_balancer_get_peer’:
lua-nginx-module/src/ngx_http_lua_balancer.c:389:41: error: variable ‘u’ set but not used [-Werror=unused-but-set-variable]
  389 |     ngx_http_upstream_t                *u;
      |
  • Loading branch information
jiahao committed Jul 3, 2024
1 parent 8cb2536 commit 2530cf3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ngx_http_lua_balancer.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ ngx_http_lua_balancer_get_peer(ngx_peer_connection_t *pc, void *data)
ngx_int_t rc;
ngx_connection_t *c;
ngx_http_request_t *r;
#if (NGX_HTTP_SSL)
ngx_http_upstream_t *u;
#endif
ngx_http_lua_ctx_t *ctx;
ngx_http_lua_srv_conf_t *lscf;
ngx_http_lua_balancer_peer_data_t *bp = data;
Expand All @@ -395,7 +397,9 @@ ngx_http_lua_balancer_get_peer(ngx_peer_connection_t *pc, void *data)
"lua balancer: get peer, tries: %ui", pc->tries);

r = bp->request;
#if (NGX_HTTP_SSL)
u = r->upstream;
#endif
lscf = bp->conf;

ngx_http_lua_assert(lscf->balancer.handler && r);
Expand Down

0 comments on commit 2530cf3

Please sign in to comment.