From 82b6044dbb643fdb5be7d75bffab02284e7ab03b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 15 Dec 2020 00:53:53 -0600 Subject: [PATCH] Trust STM32 gcc versions --- Marlin/src/HAL/STM32/HAL.h | 10 +++------- Marlin/src/HAL/STM32F1/HAL.h | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index 9842cdaae..f2fb5ddb6 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -143,19 +143,15 @@ void _delay_ms(const int delay); extern "C" char* _sbrk(int incr); -#if GCC_VERSION <= 50000 - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-function" -#endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" static inline int freeMemory() { volatile char top; return &top - reinterpret_cast(_sbrk(0)); } -#if GCC_VERSION <= 50000 - #pragma GCC diagnostic pop -#endif +#pragma GCC diagnostic pop // // ADC diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index 2c852f22e..7163db43a 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -191,10 +191,8 @@ inline void HAL_reboot() {} // reboot the board or restart the bootloader void _delay_ms(const int delay); -#if GCC_VERSION <= 50000 - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-function" -#endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" /* extern "C" { @@ -209,9 +207,7 @@ static inline int freeMemory() { return &top - _sbrk(0); } -#if GCC_VERSION <= 50000 - #pragma GCC diagnostic pop -#endif +#pragma GCC diagnostic pop // // ADC