[Privoxy-commits] [privoxy] 04/04: create_server_ssl_connection(): Declare a variable at the beginning of the code block

User Git git at git.privoxy.org
Sun Dec 20 10:00:17 UTC 2020


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit 3b4813587fa2eab6daed2738f455a7145fb31f1e
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Dec 19 17:11:42 2020 +0100

    create_server_ssl_connection(): Declare a variable at the beginning of the code block
    
    ... to silence:
        cc -c -pipe -fstack-protector-all -ggdb -Wshadow  -Wconversion -I/usr/local/include/  -pthread -Wall -std=c89   openssl.c -o openssl.o
        openssl.c:1144:12: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
              for (int i = 0; i < sk_X509_num(chain); i++)
                   ^
---
 openssl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openssl.c b/openssl.c
index 32f8f278..ecfb6bf8 100644
--- a/openssl.c
+++ b/openssl.c
@@ -1141,7 +1141,8 @@ extern int create_server_ssl_connection(struct client_state *csp)
    chain = SSL_get_peer_cert_chain(ssl);
    if (chain)
    {
-      for (int i = 0; i < sk_X509_num(chain); i++)
+      int i;
+      for (i = 0; i < sk_X509_num(chain); i++)
       {
          if (ssl_store_cert(csp, sk_X509_value(chain, i)) != 0)
          {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list