X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Fdecode_unittests.c;h=1e74c34d2cee190d75084377e85666f0c36de5ce;hb=214b0eae8aa011fa8b3e8a3dcc784f8d423aeffb;hp=6ba6d4f2eff19952307ef4cf21853ca2a4197484;hpb=113bd7ee878ac2284c8c049fdb8dc2d2bd19f016;p=apps%2Fagl-service-can-low-level.git diff --git a/tests/decode_unittests.c b/tests/decode_unittests.c index 6ba6d4f2..1e74c34d 100644 --- a/tests/decode_unittests.c +++ b/tests/decode_unittests.c @@ -1,3 +1,5 @@ +#define NANOPB_INTERNALS + #include #include #include "pb_decode.h" @@ -17,11 +19,11 @@ bool stream_callback(pb_istream_t *stream, uint8_t *buf, size_t count) } /* Verifies that the stream passed to callback matches the byte array pointed to by arg. */ -bool callback_check(pb_istream_t *stream, const pb_field_t *field, void *arg) +bool callback_check(pb_istream_t *stream, const pb_field_t *field, void **arg) { int i; uint8_t byte; - pb_bytes_array_t *ref = (pb_bytes_array_t*) arg; + pb_bytes_array_t *ref = (pb_bytes_array_t*) *arg; for (i = 0; i < ref->size; i++) {