diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2019-10-10 19:48:45 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2019-10-11 10:51:34 +0300 |
commit | 9bb001e88ad1cd7c36f090eee828d435ae63a294 (patch) | |
tree | f0e824612a09967c910b9a54624c8e9f4f89c498 | |
parent | 252f4199540a113a37d19de5ba051922909c810d (diff) | |
download | nanopb-c-9bb001e88ad1cd7c36f090eee828d435ae63a294.tar.gz |
Fix "unused variable" warning when using PB_ENCODE_ARRAYS_UNPACKED
-rw-r--r-- | pb_encode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pb_encode.c b/pb_encode.c index a8cd14e..7a4ba31 100644 --- a/pb_encode.c +++ b/pb_encode.c @@ -146,8 +146,10 @@ static bool checkreturn encode_array(pb_ostream_t *stream, const pb_field_t *fie { size_t i; const void *p; +#ifndef PB_ENCODE_ARRAYS_UNPACKED size_t size; - +#endif + if (count == 0) return true; |