From 2322b8014d9d43cbe532aa1d6ece7ff075918d4d Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 22 Oct 2015 15:00:28 -0200 Subject: [PATCH] AP_HAL: use common macro for printf formatting --- libraries/AP_HAL/UARTDriver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL/UARTDriver.h b/libraries/AP_HAL/UARTDriver.h index c5ea81ae37..3211944b3b 100644 --- a/libraries/AP_HAL/UARTDriver.h +++ b/libraries/AP_HAL/UARTDriver.h @@ -4,6 +4,8 @@ #include +#include + #include "AP_HAL_Namespace.h" #include "utility/BetterStream.h" @@ -51,10 +53,8 @@ public: */ void print_P(const prog_char_t *s); void println_P(const prog_char_t *s); - void printf(const char *s, ...) - __attribute__ ((format(__printf__, 2, 3))); - void _printf_P(const prog_char *s, ...) - __attribute__ ((format(__printf__, 2, 3))); + void printf(const char *s, ...) FORMAT(2, 3); + void _printf_P(const prog_char *s, ...) FORMAT(2, 3); void vprintf(const char *s, va_list ap); void vprintf_P(const prog_char *s, va_list ap);