mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
hott:Fix compiler error array bound is unknown
This fixes error: variable-length array bound is unknown [-Werror=vla-larger-than=] with gcc 9.1
This commit is contained in:
committed by
Daniel Agar
parent
e3e7cb4158
commit
f77fc690c7
@@ -89,7 +89,7 @@ send_poll(int uart, uint8_t *buffer, size_t size)
|
|||||||
|
|
||||||
/* A hack the reads out what was written so the next read from the receiver doesn't get it. */
|
/* A hack the reads out what was written so the next read from the receiver doesn't get it. */
|
||||||
/* TODO: Fix this!! */
|
/* TODO: Fix this!! */
|
||||||
uint8_t dummy[size];
|
uint8_t dummy[MAX_MESSAGE_BUFFER_SIZE];
|
||||||
read(uart, &dummy, size);
|
read(uart, &dummy, size);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ send_data(int uart, uint8_t *buffer, size_t size)
|
|||||||
|
|
||||||
/* A hack the reads out what was written so the next read from the receiver doesn't get it. */
|
/* A hack the reads out what was written so the next read from the receiver doesn't get it. */
|
||||||
/* TODO: Fix this!! */
|
/* TODO: Fix this!! */
|
||||||
uint8_t dummy[size];
|
uint8_t dummy[MAX_MESSAGE_BUFFER_SIZE];
|
||||||
read(uart, &dummy, size);
|
read(uart, &dummy, size);
|
||||||
|
|
||||||
return PX4_OK;
|
return PX4_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user