From f0444f1c17b67e422d12e911f5720cc2c7b02e02 Mon Sep 17 00:00:00 2001 From: Alex Mastro Date: Sat, 18 Mar 2017 18:13:38 -0700 Subject: [PATCH] Fix building with LTO=1 Fixes #207 --- src/drivers/src/ws2812_cf2.c | 2 +- src/lib/FreeRTOS/tasks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/src/ws2812_cf2.c b/src/drivers/src/ws2812_cf2.c index 6d5d521292..c946d2c6a8 100644 --- a/src/drivers/src/ws2812_cf2.c +++ b/src/drivers/src/ws2812_cf2.c @@ -169,7 +169,7 @@ static int current_led = 0; static int total_led = 0; static uint8_t (*color_led)[3] = NULL; -void ws2812Send(uint8_t (*color)[3], int len) +void ws2812Send(uint8_t (*color)[3], uint16_t len) { int i; if(len<1) return; diff --git a/src/lib/FreeRTOS/tasks.c b/src/lib/FreeRTOS/tasks.c index 11ca0e976b..6adf9db6a6 100644 --- a/src/lib/FreeRTOS/tasks.c +++ b/src/lib/FreeRTOS/tasks.c @@ -2200,7 +2200,7 @@ BaseType_t xSwitchRequired = pdFALSE; #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ -void vTaskSwitchContext( void ) +void __attribute__((used)) vTaskSwitchContext( void ) { if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) {