firmware: need extra cast for nanopb call in message.c

This commit is contained in:
Pavol Rusnak 2017-09-28 13:19:03 +02:00
parent 1f1c3bf35f
commit 1072369bc4
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 1 deletions

View File

@ -320,7 +320,8 @@ void msg_read_tiny(const uint8_t *buf, int len)
}
const pb_field_t *fields = 0;
pb_istream_t stream = pb_istream_from_buffer(buf + 9, msg_size);
// upstream nanopb is missing const qualifier, so we have to cast :-/
pb_istream_t stream = pb_istream_from_buffer((uint8_t *)buf + 9, msg_size);
switch (msg_id) {
case MessageType_MessageType_PinMatrixAck:

View File

@ -1,3 +1,6 @@
*.pb
*_pb2.py
*.pb.c
*.pb.h
messages_map.h
__pycache__/