Silence a warning when compiling without FEATURE_HTTPS_INSPECTION
authorFabian Keil <fk@fabiankeil.de>
Wed, 3 Jun 2020 12:07:29 +0000 (14:07 +0200)
committerFabian Keil <fk@fabiankeil.de>
Wed, 3 Jun 2020 12:13:03 +0000 (14:13 +0200)
    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

cgi.c

diff --git a/cgi.c b/cgi.c
index b9f8194..580e2bf 100644 (file)
--- 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);