Skip to content

Commit 2e3c60b

Browse files
committed
Fix compiler warning: "UNUSED" redefined
Fix #44 cores/arduino/syscalls_stm32.c:45:0: warning: "UNUSED" redefined #define UNUSED(x) x ## _UNUSED __attribute__((__unused__)) Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 3f6c7c7 commit 2e3c60b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cores/arduino/syscalls_stm32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141

4242
// Helper macro to mark unused parameters and prevent compiler warnings.
4343
// Appends _UNUSED to the variable name to prevent accidentally using them.
44+
#ifdef UNUSED
45+
#undef UNUSED
46+
#endif
4447
#ifdef __GNUC__
4548
#define UNUSED(x) x ## _UNUSED __attribute__((__unused__))
4649
#else

0 commit comments

Comments
 (0)