From: Dr. David von Oheimb Date: Thu, 4 Jun 2020 10:37:50 +0000 (+0200) Subject: Silence gcc false positive warning on alpn_protos_len in test/handshake_helper.c X-Git-Tag: openssl-3.0.0-alpha4~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a61b6b623df1295976d82c177707ac80f2751237;p=thirdparty%2Fopenssl.git Silence gcc false positive warning on alpn_protos_len in test/handshake_helper.c Reviewed-by: Matt Caswell Reviewed-by: Bernd Edlinger Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/12042) --- diff --git a/test/handshake_helper.c b/test/handshake_helper.c index 030073289af..2dfded5c119 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -641,7 +641,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... */