diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-09-11 13:16:20 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-09-11 13:16:20 +0300 |
commit | b9f14bddf778a5ed27e3289b90a0657fec3e1a53 (patch) | |
tree | 972d67e547f1816d3dbe0643ea8add734ef8e90e /tests/missing_fields | |
parent | e2e9980627810fe0ee2b8f119bcf651f0f318a8a (diff) |
Make all the tests ANSI C compatible.
Diffstat (limited to 'tests/missing_fields')
-rw-r--r-- | tests/missing_fields/missing_fields.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/missing_fields/missing_fields.c b/tests/missing_fields/missing_fields.c index 27741847..b9a273a2 100644 --- a/tests/missing_fields/missing_fields.c +++ b/tests/missing_fields/missing_fields.c @@ -7,12 +7,13 @@ int main() { - uint8_t buffer[512] = {}; + uint8_t buffer[512]; /* Create a message with one missing field */ { - MissingField msg = {}; + MissingField msg = {0}; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + if (!pb_encode(&stream, MissingField_fields, &msg)) { printf("Encode failed.\n"); @@ -22,7 +23,7 @@ int main() /* Test that it decodes properly if we don't require that field */ { - MissingField msg = {}; + MissingField msg = {0}; pb_istream_t stream = pb_istream_from_buffer(buffer, sizeof(buffer)); if (!pb_decode(&stream, MissingField_fields, &msg)) @@ -34,7 +35,7 @@ int main() /* Test that it does *not* decode properly if we require the field */ { - AllFields msg = {}; + AllFields msg = {0}; pb_istream_t stream = pb_istream_from_buffer(buffer, sizeof(buffer)); if (pb_decode(&stream, AllFields_fields, &msg)) |