diff options
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_chunked_filter.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_index_handler.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_range_filter.c | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_chunked_filter.c b/src/http/modules/ngx_http_chunked_filter.c index 75a0cdfd6..bdd0a7c7a 100644 --- a/src/http/modules/ngx_http_chunked_filter.c +++ b/src/http/modules/ngx_http_chunked_filter.c @@ -85,7 +85,7 @@ static int ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } ngx_test_null(chunk, ngx_palloc(r->pool, 11), NGX_ERROR); - len = ngx_snprintf(chunk, 11, "%x" CRLF, size); + len = ngx_snprintf(chunk, 11, SIZEX_FMT CRLF, size); ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); h->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP; diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c index cc7c92790..ffb9779bf 100644 --- a/src/http/modules/ngx_http_index_handler.c +++ b/src/http/modules/ngx_http_index_handler.c @@ -240,7 +240,7 @@ static char *ngx_http_index_merge_conf(ngx_pool_t *p, void *parent, void *child) if (conf->max_index_len == 0) { if (prev->max_index_len != 0) { - ngx_memcpy(conf, prev, sizeof(ngx_http_index_conf_t)); + ngx_memcpy(conf, prev, sizeof(ngx_http_index_conf_t)); return NGX_CONF_OK; } diff --git a/src/http/modules/ngx_http_range_filter.c b/src/http/modules/ngx_http_range_filter.c index d32123b12..d0273ec1c 100644 --- a/src/http/modules/ngx_http_range_filter.c +++ b/src/http/modules/ngx_http_range_filter.c @@ -61,6 +61,10 @@ static int ngx_http_range_header_filter(ngx_http_request_t *r) ngx_init_array(r->headers_out.ranges, r->pool, 5, sizeof(ngx_http_range_t), NGX_ERROR); +#if (NGX_SUPPRESS_WARN) + range = NULL; +#endif + rc = 0; p = r->headers_in.range->value.data + 6; @@ -149,7 +153,7 @@ static int ngx_http_range_header_filter(ngx_http_request_t *r) ngx_palloc(r->pool, 8 + 20 + 1), NGX_ERROR); - r->headers_out.content_range->value.len = + r->headers_out.content_range->value.len = ngx_snprintf(r->headers_out.content_range->value.data, 8 + 20 + 1, "bytes */" OFF_FMT, r->headers_out.content_length); @@ -170,7 +174,7 @@ static int ngx_http_range_header_filter(ngx_http_request_t *r) ngx_palloc(r->pool, 6 + 20 + 1 + 20 + 1 + 20 + 1), NGX_ERROR); - r->headers_out.content_range->value.len = + r->headers_out.content_range->value.len = ngx_snprintf(r->headers_out.content_range->value.data, 6 + 20 + 1 + 20 + 1 + 20 + 1, "bytes " OFF_FMT "-" OFF_FMT "/" OFF_FMT, @@ -244,7 +248,7 @@ static int ngx_http_range_header_filter(ngx_http_request_t *r) ngx_palloc(r->pool, 20 + 1 + 20 + 1 + 20 + 5), NGX_ERROR); - range[i].content_range.len = + range[i].content_range.len = ngx_snprintf(range[i].content_range.data, 20 + 1 + 20 + 1 + 20 + 5, OFF_FMT "-" OFF_FMT "/" OFF_FMT CRLF CRLF, |
