From 81d550754aef02f38ad86b11f219e6b3647ab894 Mon Sep 17 00:00:00 2001 From: Karl Andersson Date: Fri, 21 Jun 2019 07:48:10 +0200 Subject: [PATCH] Fix "UNUSED" redefined warning on HAL_STM32 (#14342) --- Marlin/src/core/macros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 2faf9900d..c12b9fd04 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -57,7 +57,11 @@ // Remove compiler warning on an unused variable #ifndef UNUSED - #define UNUSED(x) ((void)(x)) + #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + #define UNUSED(X) (void)X + #else + #define UNUSED(x) ((void)(x)) + #endif #endif // Macros to make a string from a macro