aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@github.mail.kapsi.fi>2015-09-22 07:24:21 +0300
committerPetteri Aimonen <jpa@github.mail.kapsi.fi>2015-09-22 07:24:21 +0300
commit6db720aa7597d1830016ad3f697ddade65d481bf (patch)
tree00857154bcddeaf9aea33572da25a09dd3f5aa16
parentaa316910644779259894ba57b528260eb9da1cb5 (diff)
parente3283e77b825ae9c0c468762fce9b5797b70cba4 (diff)
Merge pull request #171 from kylemanna/misc
decode: Fix compiler issue with gcc-5
-rw-r--r--pb_decode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pb_decode.c b/pb_decode.c
index b21bfe37..5cdcbcfb 100644
--- a/pb_decode.c
+++ b/pb_decode.c
@@ -886,7 +886,8 @@ bool checkreturn pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[
if (PB_HTYPE(iter.pos->type) == PB_HTYPE_REQUIRED
&& iter.required_field_index < PB_MAX_REQUIRED_FIELDS)
{
- fields_seen[iter.required_field_index >> 3] |= (uint8_t)(1 << (iter.required_field_index & 7));
+ uint8_t tmp = (uint8_t)(1 << (iter.required_field_index & 7));
+ fields_seen[iter.required_field_index >> 3] |= tmp;
}
if (!decode_field(stream, wire_type, &iter))