From: Fabian Keil <fk@fabiankeil.de>
Date: Wed, 3 Jun 2020 12:07:29 +0000 (+0200)
Subject: Silence a warning when compiling without FEATURE_HTTPS_INSPECTION
X-Git-Tag: v_3_0_29~332
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/static/@default-cgi@show-status?a=commitdiff_plain;h=038436dace0ed97529a10ecc4fefb7f2f2c0b1a4;p=privoxy.git

Silence a warning when compiling without FEATURE_HTTPS_INSPECTION

    cgi.c:447:22: warning: unused variable 'alt_prefix_https' [-Wunused-variable]
       static const char alt_prefix_https[] = "https://" CGI_SITE_1_HOST "/";

Sponsored by: Robert Klemme
---

diff --git a/cgi.c b/cgi.c
index b9f81947..580e2bfb 100644
--- a/cgi.c
+++ b/cgi.c
@@ -444,7 +444,9 @@ static int referrer_is_safe(const struct client_state *csp)
 {
    char *referrer;
    static const char alternative_prefix[] = "http://" CGI_SITE_1_HOST "/";
+#ifdef FEATURE_HTTPS_INSPECTION
    static const char alt_prefix_https[] = "https://" CGI_SITE_1_HOST "/";
+#endif
    const char *trusted_cgi_referrer = csp->config->trusted_cgi_referrer;
 
    referrer = grep_cgi_referrer(csp);