Fix gcc4.6 errors on -Wunused-but-set-variable #10

Merged
merged 2 commits into from Jan 18, 2012
View
@@ -223,7 +223,6 @@ ngx_http_zip_generate_pieces(ngx_http_request_t *r, ngx_http_zip_ctx_t *ctx)
#ifdef NGX_ZIP_HAVE_ICONV
if (ctx->unicode_path) {
size_t inlen = file->filename.len, outlen, outleft;
- size_t res;
u_char *p, *in;
//inbuf
@@ -243,8 +242,8 @@ ngx_http_zip_generate_pieces(ngx_http_request_t *r, ngx_http_zip_ctx_t *ctx)
iconv(iconv_cd, NULL, NULL, NULL, NULL);
//convert the string
- res = iconv(iconv_cd, (char **)&in, &inlen, (char **)&p, &outleft);
- //XXX if (res == (size_t)-1) { ? }
+ iconv(iconv_cd, (char **)&in, &inlen, (char **)&p, &outleft);
+ //XXX if (res == (size_t)-1) { ? }
file->filename.len = outlen - outleft;
View
@@ -196,10 +196,8 @@ ngx_http_zip_add_partial_content_range(ngx_http_request_t *r,
ngx_int_t
ngx_http_zip_strip_range_header(ngx_http_request_t *r)
{
- ngx_list_part_t *part;
ngx_table_elt_t *header;
- part = &r->headers_in.headers.part;
header = r->headers_in.range;
if (header) {