From ec3bff4ba110ffad31fccdbf74c4c180fc041414 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Mon, 4 Aug 2014 18:40:40 +0300 Subject: Generate #defines for initializing message structures. Usage like: MyMessage foo = MyMessage_init_default; MyMessage_init_default will initialize to default values defined in .proto. MyMessage_init_zero will initialize to null/zero values. Same results as {} or {0}, but will avoid compiler warnings by initializing everything explicitly. Update issue 79 Status: FixedInGit --- tests/basic_buffer/decode_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/basic_buffer/decode_buffer.c') diff --git a/tests/basic_buffer/decode_buffer.c b/tests/basic_buffer/decode_buffer.c index fae9e2fa..291d164c 100644 --- a/tests/basic_buffer/decode_buffer.c +++ b/tests/basic_buffer/decode_buffer.c @@ -16,7 +16,7 @@ bool print_person(pb_istream_t *stream) { int i; - Person person; + Person person = Person_init_zero; if (!pb_decode(stream, Person_fields, &person)) return false; -- cgit 1.2.3-korg