Browse Source

Fix "UNUSED" redefined warning on HAL_STM32 (#14342)

Karl Andersson 6 years ago
parent
commit
81d550754a
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      Marlin/src/core/macros.h

+ 5
- 1
Marlin/src/core/macros.h View File

@@ -57,7 +57,11 @@
57 57
 
58 58
 // Remove compiler warning on an unused variable
59 59
 #ifndef UNUSED
60
-  #define UNUSED(x) ((void)(x))
60
+  #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
61
+    #define UNUSED(X) (void)X
62
+  #else
63
+    #define UNUSED(x) ((void)(x))
64
+  #endif
61 65
 #endif
62 66
 
63 67
 // Macros to make a string from a macro

Loading…
Cancel
Save