A static const variable is implicitly zero initialized

Older clang versions complain about the explicit initializer
because the first member of the struct is a struct.
But it is not necessary to explicitly initialize it anyway.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19284)
This commit is contained in:
Tomas Mraz 2022-09-27 17:39:01 +02:00
parent 2f7e61b8b2
commit 31fbf119f3

View File

@ -1012,7 +1012,7 @@ static ossl_ssize_t dgram_pair_write_actual(BIO *bio, const char *buf, size_t sz
const BIO_ADDR *local, const BIO_ADDR *peer,
int is_multi)
{
static const BIO_ADDR zero_addr = {0};
static const BIO_ADDR zero_addr;
size_t saved_idx, saved_count;
struct bio_dgram_pair_st *b = bio->ptr, *peerb;
struct dgram_hdr hdr = {0};