From: Dr. David von Oheimb Date: Thu, 4 Jun 2020 10:34:00 +0000 (+0200) Subject: Silence gcc false positive warning on alpn_protos_len in test/handshake_helper.c X-Git-Tag: OpenSSL_1_1_1h~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fef6d55d379bc6dacf05713c38f3ec81957ea69;p=thirdparty%2Fopenssl.git Silence gcc false positive warning on alpn_protos_len in test/handshake_helper.c Fixes #12033 Reviewed-by: Matt Caswell Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/12041) --- diff --git a/test/handshake_helper.c b/test/handshake_helper.c index 1742004b5b8..347f6b49edd 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -637,7 +637,8 @@ static int configure_handshake_ctx(SSL_CTX *server_ctx, SSL_CTX *server2_ctx, } if (extra->client.alpn_protocols != NULL) { unsigned char *alpn_protos = NULL; - size_t alpn_protos_len; + size_t alpn_protos_len = 0; + if (!TEST_true(parse_protos(extra->client.alpn_protocols, &alpn_protos, &alpn_protos_len)) /* Reversed return value convention... */