From 97f214d0c9059cd85f634155f6f3c49648953558 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 3 Apr 2014 17:03:02 +0200 Subject: http2+openssl: fix compiler warnings in ALPN using code --- lib/vtls/openssl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 35912c74c..b59233a25 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1892,11 +1892,6 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) struct SessionHandle *data = conn->data; int err; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; -#ifdef HAS_ALPN - char* neg_protocol; - int len = 0; -#endif - DEBUGASSERT(ssl_connect_2 == connssl->connecting_state || ssl_connect_2_reading == connssl->connecting_state || ssl_connect_2_writing == connssl->connecting_state); @@ -1998,6 +1993,8 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) * negotiated */ if(data->set.ssl_enable_alpn) { + const unsigned char* neg_protocol; + unsigned int len; SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len); if(len != 0) { infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol); -- cgit v1.2.3