Skip to content

Commit

Permalink
Fix GCC4.6 errors on -Wunused-but-set-variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
sam authored and wieck committed Jan 12, 2012
1 parent f8ba503 commit eb9fa0f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions ngx_http_zip_file.c
Expand Up @@ -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
Expand All @@ -243,8 +242,7 @@ 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);

file->filename.len = outlen - outleft;

Expand Down
2 changes: 0 additions & 2 deletions ngx_http_zip_headers.c
Expand Up @@ -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) {
Expand Down

0 comments on commit eb9fa0f

Please sign in to comment.