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.
This commit is contained in:
Petteri Aimonen
2012-07-18 21:09:13 +03:00
parent d8bddabb83
commit 10b5da12dc
3 changed files with 8 additions and 5 deletions

View File

@@ -409,7 +409,7 @@ static void pb_message_set_to_defaults(const pb_field_t fields[], void *dest_str
bool checkreturn pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct)
{
uint8_t fields_seen[(PB_MAX_REQUIRED_FIELDS + 7) / 8] = {}; /* Used to check for required fields */
uint8_t fields_seen[(PB_MAX_REQUIRED_FIELDS + 7) / 8] = {0}; /* Used to check for required fields */
pb_field_iterator_t iter;
pb_message_set_to_defaults(fields, dest_struct);