From 71bd75f7592aa05245375e7ce96c38a8a99ea655 Mon Sep 17 00:00:00 2001 From: witekfl Date: Wed, 8 Aug 2012 22:36:21 +0200 Subject: [PATCH] Avoid a warning when gzip, bzip2 nor lzma is compiled-in. --- src/protocol/http/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index e58c7af14..ce14031cd 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -1887,12 +1887,13 @@ again: d = parse_header(conn->cached->head, "Content-Encoding", NULL); if (d) { +#if defined(CONFIG_GZIP) || defined(CONFIG_BZIP2) || defined(CONFIG_LZMA) unsigned char *extension = get_extension_from_uri(uri); enum stream_encoding file_encoding; file_encoding = extension ? guess_encoding(extension) : ENCODING_NONE; mem_free_if(extension); - +#endif /* If the content is encoded, we want to preserve the encoding * if it is implied by the extension, so that saving the URI * will leave the saved file with the correct encoding. */