From 606a4362b3c8d64b3df8e3858330d7465e14e1f3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 1 Oct 2018 04:31:30 -0500 Subject: [PATCH] Reduce STM32F4 compile warnings --- Marlin/src/HAL/HAL_STM32F4/HAL.h | 1 + Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h | 1 + Marlin/src/core/macros.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.h b/Marlin/src/HAL/HAL_STM32F4/HAL.h index 20d9e05999..b0abf81995 100644 --- a/Marlin/src/HAL/HAL_STM32F4/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F4/HAL.h @@ -110,6 +110,7 @@ #define NUM_SERIAL 1 #endif +#undef _BV #define _BV(b) (1 << (b)) /** diff --git a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h index e185344dc2..d102e64f75 100644 --- a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h +++ b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h @@ -29,6 +29,7 @@ #ifndef _FASTIO_STM32F4_H #define _FASTIO_STM32F4_H +#undef _BV #define _BV(b) (1 << (b)) #define USEABLE_HARDWARE_PWM(p) true diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 520c10fc78..df21b0519f 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -57,7 +57,7 @@ #define NANOSECONDS_PER_CYCLE (1000000000.0 / F_CPU) // Remove compiler warning on an unused variable -#define UNUSED(x) (void) (x) +#define UNUSED(x) ((void)(x)) // Macros to make a string from a macro #define STRINGIFY_(M) #M