diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-07-18 21:09:13 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-07-18 21:09:13 +0300 |
commit | 10b5da12dc9757b345a9d6f9daeef9098731ff69 (patch) | |
tree | d9c423c06424f15bbc30bab205418ae5495bc5e1 /pb_encode.c | |
parent | d8bddabb8372d1c684d7cd7cf4bb04131acb9ff1 (diff) |
Fixed a few compiler warnings, added check.
Main code is now compiled (for tests) with -pedantic -Wextra.
The test programs are not as strictly bound, but this should
improve the chances that atleast the core library compiles with
most compilers without warnings.
Diffstat (limited to 'pb_encode.c')
-rw-r--r-- | pb_encode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pb_encode.c b/pb_encode.c index be909ec2..8868bb64 100644 --- a/pb_encode.c +++ b/pb_encode.c @@ -99,7 +99,7 @@ static bool checkreturn encode_array(pb_ostream_t *stream, const pb_field_t *fie } else { - pb_ostream_t sizestream = {0}; + pb_ostream_t sizestream = {0,0,0,0}; p = pData; for (i = 0; i < count; i++) { @@ -314,7 +314,7 @@ bool checkreturn pb_encode_string(pb_ostream_t *stream, const uint8_t *buffer, s bool checkreturn pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct) { /* First calculate the message size using a non-writing substream. */ - pb_ostream_t substream = {0}; + pb_ostream_t substream = {0,0,0,0}; size_t size; bool status; |