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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user