From 1b46104a98881bbe213fd31e186766adcef5d12a Mon Sep 17 00:00:00 2001 From: Francisco Ferreira Date: Sat, 11 Aug 2018 17:40:23 +0100 Subject: [PATCH] AP_HAL_ChibiOS: fix warning when STDOUT is defined ../../libraries/AP_HAL_ChibiOS/UARTDriver.cpp:118:12: warning: 'int hal_console_vprintf(const char*, va_list)' defined but not used [-Wunused-function] static int hal_console_vprintf(const char *fmt, va_list arg) ^ --- libraries/AP_HAL_ChibiOS/UARTDriver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp index a9e6f18d01..9034a78154 100644 --- a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp +++ b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp @@ -110,7 +110,7 @@ void UARTDriver::thread_init(void) #endif } - +#ifndef HAL_STDOUT_SERIAL /* hook to allow printf() to work on hal.console when we don't have a dedicated debug console @@ -120,7 +120,7 @@ static int hal_console_vprintf(const char *fmt, va_list arg) hal.console->vprintf(fmt, arg); return 1; // wrong length, but doesn't matter for what this is used for } - +#endif void UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS) {