Skip to content

Commit 436ec80

Browse files
author
Brice Figureau
committed
Fix masterzen#16 - compilation error on kfreebsd
This should fix the compilation error when compiling with the -Wunused-but-set-variable gcc option.
1 parent c7c663f commit 436ec80

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

ngx_http_uploadprogress_module.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ static void ngx_http_uploadprogress_event_handler(ngx_http_request_t *r)
449449
{
450450
ngx_str_t *id, *oldid;
451451
ngx_slab_pool_t *shpool;
452-
ngx_connection_t *c;
453452
ngx_shm_zone_t *shm_zone;
454453
ngx_http_uploadprogress_ctx_t *ctx;
455454
ngx_http_uploadprogress_node_t *up;
@@ -458,8 +457,6 @@ static void ngx_http_uploadprogress_event_handler(ngx_http_request_t *r)
458457

459458
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "upload-progress: ngx_http_uploadprogress_event_handler");
460459

461-
c = r->connection;
462-
463460
/* find node, update rest */
464461
oldid = id = get_tracking_id(r);
465462

@@ -1007,14 +1004,12 @@ ngx_http_uploadprogress_cleanup(void *data)
10071004
ngx_http_uploadprogress_cleanup_t *upcln = data;
10081005
ngx_slab_pool_t *shpool;
10091006
ngx_rbtree_node_t *node;
1010-
ngx_http_uploadprogress_ctx_t *ctx;
10111007
ngx_http_uploadprogress_node_t *up;
10121008
ngx_http_request_t *r;
10131009

10141010
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, upcln->shm_zone->shm.log, 0,
10151011
"uploadprogress cleanup called");
10161012

1017-
ctx = upcln->shm_zone->data;
10181013
shpool = (ngx_slab_pool_t *) upcln->shm_zone->shm.addr;
10191014
node = upcln->node;
10201015
r = upcln->r;
@@ -1240,7 +1235,6 @@ static void*
12401235
ngx_http_uploadprogress_create_loc_conf(ngx_conf_t * cf)
12411236
{
12421237
ngx_http_uploadprogress_conf_t *conf;
1243-
ngx_http_uploadprogress_template_t *t;
12441238
ngx_uint_t i;
12451239

12461240
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_uploadprogress_conf_t));
@@ -1252,7 +1246,6 @@ ngx_http_uploadprogress_create_loc_conf(ngx_conf_t * cf)
12521246
return NGX_CONF_ERROR;
12531247
}
12541248

1255-
t = conf->templates.elts;
12561249
for(i = 0;i < conf->templates.nalloc; i++) {
12571250
ngx_http_uploadprogress_template_t *elt = ngx_array_push(&conf->templates);
12581251
if (elt == NULL) {
@@ -1312,9 +1305,7 @@ static ngx_int_t
13121305
ngx_http_uploadprogress_init_variables_and_templates(ngx_conf_t *cf)
13131306
{
13141307
ngx_http_variable_t *var, *v;
1315-
ngx_http_uploadprogress_template_t *t;
13161308
ngx_http_uploadprogress_state_map_t *m;
1317-
ssize_t n;
13181309
ngx_uint_t i;
13191310

13201311
/* Add variables */
@@ -1335,12 +1326,11 @@ ngx_http_uploadprogress_init_variables_and_templates(ngx_conf_t *cf)
13351326
}
13361327

13371328
m = ngx_http_uploadprogress_state_map;
1338-
t = ngx_http_uploadprogress_global_templates.elts;
13391329
i = 0;
13401330

13411331
while(m->name.data != NULL) {
13421332
ngx_http_uploadprogress_template_t *elt = ngx_array_push(&ngx_http_uploadprogress_global_templates);
1343-
n = ngx_http_script_variables_count(ngx_http_uploadprogress_java_defaults + i);
1333+
ngx_http_script_variables_count(ngx_http_uploadprogress_java_defaults + i);
13441334

13451335
if (ngx_http_upload_progress_set_template(cf, elt, ngx_http_uploadprogress_java_defaults + i) != NGX_CONF_OK) {
13461336
return NGX_ERROR;

0 commit comments

Comments
 (0)