~sircmpwn/gmni-devel

Fix missing braces error for old GCC versions v1 REJECTED

Callum Brown: 1
 Fix missing braces error for old GCC versions

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/23417/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Fix missing braces error for old GCC versions Export this patch

With GCC 4.9.4 you get
src/certs.c:75:2: error: missing braces around initializer [-Werror=missing-braces]
  br_skey_decoder_context skdec = {0};
---
Or you could have
	br_skey_decoder_context skdec = {{{0}}};
and use -Wno-missing-field-initializers

Of course there probably aren't many people using error throwing
versions any more.
 src/certs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/certs.c b/src/certs.c
index f40bfa7..dc86497 100644
--- a/src/certs.c
+++ b/src/certs.c
@@ -72,7 +72,7 @@ gmni_ccert_load(struct gmni_client_certificate *cert, FILE *certin, FILE *skin)
		goto error;
	}

	br_skey_decoder_context skdec = {0};
	br_skey_decoder_context skdec = {{{0}}, {0}, {0}, {0}, 0, 0, 0, {0}, 0, {0}};
	br_skey_decoder_init(&skdec);
	br_pem_decoder_init(&pemdec);

-- 
2.32.0
gcc 4 is seven years old. Upgrade your compiler.