From: Petteri Aimonen Date: Wed, 18 Jul 2012 18:21:07 +0000 (+0300) Subject: Fix an unsigned vs. signed warning on some compiler. X-Git-Tag: 3.99.1~14^2~479 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=8524de39ce2e4c369ed1051c7ed2e4cd43ad321d;p=apps%2Flow-level-can-service.git Fix an unsigned vs. signed warning on some compiler. --- diff --git a/pb_decode.c b/pb_decode.c index e183be7..cada00c 100644 --- a/pb_decode.c +++ b/pb_decode.c @@ -117,7 +117,7 @@ bool checkreturn pb_skip_string(pb_istream_t *stream) return pb_read(stream, NULL, length); } -bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, int *tag, bool *eof) +bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof) { uint32_t temp; *eof = false; @@ -418,7 +418,7 @@ bool checkreturn pb_decode(pb_istream_t *stream, const pb_field_t fields[], void while (stream->bytes_left) { - int tag; + uint32_t tag; pb_wire_type_t wire_type; bool eof; diff --git a/pb_decode.h b/pb_decode.h index 0abb342..7045c5d 100644 --- a/pb_decode.h +++ b/pb_decode.h @@ -48,7 +48,7 @@ bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struc * You may want to use these from your caller or callbacks. */ -bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, int *tag, bool *eof); +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest);