From 913febd3db0ef865652d9d67018fc9d0ea6515ca Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Mon, 10 Apr 2017 11:41:08 +0800 Subject: [PATCH] Fix mbed_board.c compiler warning Fix the following compiler warning. Compile [ 63.7%]: mbed_board.c [Warning] mbed_board.c@99,36: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tony Wu --- platform/mbed_board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/mbed_board.c b/platform/mbed_board.c index 16ca2944a6d..093d67dcc98 100644 --- a/platform/mbed_board.c +++ b/platform/mbed_board.c @@ -88,7 +88,7 @@ void mbed_error_vfprintf(const char * format, va_list arg) { serial_init(&stdio_uart, STDIO_UART_TX, STDIO_UART_RX); } #if MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES - for (unsigned int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { if (buffer[i] == '\n' && stdio_out_prev != '\r') { serial_putc(&stdio_uart, '\r'); } @@ -96,7 +96,7 @@ void mbed_error_vfprintf(const char * format, va_list arg) { stdio_out_prev = buffer[i]; } #else - for (unsigned int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { serial_putc(&stdio_uart, buffer[i]); } #endif