AP_Networking: fixed build with gcc 11.x

This commit is contained in:
Andrew Tridgell 2023-11-14 09:16:00 +11:00 committed by Tom Pittenger
parent 4a773eabb2
commit 8151ee36c7

View File

@ -54,7 +54,7 @@ void AP_Networking::test_UDP_client(void)
while (true) {
hal.scheduler->delay(100);
char *s = nullptr;
asprintf(&s, "hello %u", unsigned(AP_HAL::millis()));
IGNORE_RETURN(asprintf(&s, "hello %u", unsigned(AP_HAL::millis())));
sock->send((const void*)s, strlen(s));
free(s);
uint8_t buf[128] {};
@ -89,7 +89,7 @@ void AP_Networking::test_TCP_client(void)
while (true) {
hal.scheduler->delay(100);
char *s = nullptr;
asprintf(&s, "hello %u", unsigned(AP_HAL::millis()));
IGNORE_RETURN(asprintf(&s, "hello %u", unsigned(AP_HAL::millis())));
sock->send((const void*)s, strlen(s));
free(s);
uint8_t buf[128] {};