From: tb Date: Thu, 6 Jun 2024 16:13:12 +0000 (+0000) Subject: ssl_tlsext: fix uninitialized variable warning with gcc X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=876d5c2559afc31e2324b480e373ab12ef44f234;p=openbsd ssl_tlsext: fix uninitialized variable warning with gcc This is a false positive but as is well-known, gcc is terrible at understanding conditionally initialized variables and it is tedious to explain this to downstream maintainers who look at warnings. ok miod --- diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index 64fa52e20cc..62bb3d737a3 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.149 2024/04/16 17:46:30 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.150 2024/06/06 16:13:12 tb Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing * Copyright (c) 2017 Doug Hogan @@ -1472,7 +1472,8 @@ tlsext_keyshare_server_process(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) size_t i, j, client_groups_index; int preferred_group_found = 0; int decode_error; - uint16_t group, client_preferred_group; + uint16_t client_preferred_group = 0; + uint16_t group; CBS client_shares, key_exchange; /*