Message ID | 20250125100838.20796-1-gert@greenie.muc.de |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,v2] tls_crypt_v2_write_client_key_file: Fix missing-field-initializers compiler warning | expand |
Not sure why the compiler is more picky here than on other inits, but maybe it's "... = {2}" vs "... = {0}" (which means "all is 0", so the actual element first in the struct does not matter). Anyway, ".n = 2" is what we want so there is no harm in writing that done :-) - and the buildbots agree that all platform compilers are fine with it. Your patch has been applied to the master branch. commit 2a50daf5fe6c924c8d945b3d0455c9e282cd769f Author: Frank Lichtenheld Date: Sat Jan 25 11:08:38 2025 +0100 tls_crypt_v2_write_client_key_file: Fix missing-field-initializers compiler warning Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20250125100838.20796-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30588.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index 24df930..4c421aa 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -691,7 +691,7 @@ struct buffer client_key_pem = { 0 }; struct buffer dst = alloc_buf_gc(TLS_CRYPT_V2_CLIENT_KEY_LEN + TLS_CRYPT_V2_MAX_WKC_LEN, &gc); - struct key2 client_key = { 2 }; + struct key2 client_key = { .n = 2 }; if (!rand_bytes((void *)client_key.keys, sizeof(client_key.keys))) {