diff --git a/demos/bsp/boards/printf_retarget.c b/demos/bsp/boards/printf_retarget.c index dd33d2dba..ee95f25ef 100644 --- a/demos/bsp/boards/printf_retarget.c +++ b/demos/bsp/boards/printf_retarget.c @@ -41,11 +41,11 @@ #if CFG_PRINTF_TARGET != PRINTF_TARGET_SEMIHOST #if CFG_PRINTF_TARGET == PRINTF_TARGET_UART - #define retarget_getchar() board_uart_getchar() + #define retarget_getchar() board_uart_getchar() #define retarget_putchar(c) board_uart_putchar(c); #elif CFG_PRINTF_TARGET == PRINTF_TARGET_SWO volatile int32_t ITM_RxBuffer; // keil variable to read from SWO - #define retarget_getchar() ITM_ReceiveChar() + #define retarget_getchar() ITM_ReceiveChar() #define retarget_putchar(c) ITM_SendChar(c) #else #error Target is not implemented yet @@ -68,17 +68,14 @@ int __sys_write (int iFileHandle, char *buf, int length) { (void) iFileHandle; - int ret = length; for (int i=0; i @@ -133,18 +130,14 @@ size_t __write(int handle, const unsigned char *buf, size_t length) /* Check for stdout and stderr (only necessary if FILE descriptors are enabled.) */ if (handle != 1 && handle != 2) return -1; - size_t ret = length; for (size_t i=0; i