From: Tomas Mraz Date: Tue, 27 Sep 2022 15:39:01 +0000 (+0200) Subject: A static const variable is implicitly zero initialized X-Git-Tag: openssl-3.2.0-alpha1~2005 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=31fbf119f396cf67e808cb95e28302dbe45174cb 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 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/19284) --- diff --git a/crypto/bio/bss_dgram_pair.c b/crypto/bio/bss_dgram_pair.c index f2d6ecbb56..2b99f794e0 100644 --- a/crypto/bio/bss_dgram_pair.c +++ b/crypto/bio/bss_dgram_pair.c @@ -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};