From d38f59dbcdfabbe71361764e194e1ad6202f902c Mon Sep 17 00:00:00 2001 From: Kody Stribrny <89810515+kstribrnAmzn@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:30:06 -0800 Subject: Remove trailing parentheses from #undef (#8) Trailing parentheses when undefining a macro lead to compiler 'extra token' warnings Inspired by - https://forums.freertos.org/t/avr-gcc-warning-extra-tokens-at-end-of-undef-in-porthardware-h/16365/4 --- GCC/AVR_AVRDx/porthardware.h | 18 +++++++++--------- GCC/AVR_Mega0/porthardware.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/GCC/AVR_AVRDx/porthardware.h b/GCC/AVR_AVRDx/porthardware.h index 52e3f12..74a16bc 100644 --- a/GCC/AVR_AVRDx/porthardware.h +++ b/GCC/AVR_AVRDx/porthardware.h @@ -174,21 +174,21 @@ RTC.PER = RTC_PERIOD_HZ( configTICK_RATE_HZ ); \ RTC.INTCTRL |= 1 << RTC_OVF_bp; \ } - #undef TICK_TMR_STOP() - #undef TICK_TMR_START() - #undef TICK_TMR_READ() - #undef TICK_INT_READY() + #undef TICK_TMR_STOP + #undef TICK_TMR_START + #undef TICK_TMR_READ + #undef TICK_INT_READY #endif #else /* if ( configUSE_TIMER_INSTANCE == 0 ) */ #undef TICK_INT_vect #undef INT_FLAGS #undef INT_MASK - #undef TICK_init() - #undef TICK_TMR_STOP() - #undef TICK_TMR_START() - #undef TICK_TMR_READ() - #undef TICK_INT_READY() + #undef TICK_init + #undef TICK_TMR_STOP + #undef TICK_TMR_START + #undef TICK_TMR_READ + #undef TICK_INT_READY #error Invalid timer setting. #endif /* if ( configUSE_TIMER_INSTANCE == 0 ) */ diff --git a/GCC/AVR_Mega0/porthardware.h b/GCC/AVR_Mega0/porthardware.h index 05a04ae..4cdb885 100644 --- a/GCC/AVR_Mega0/porthardware.h +++ b/GCC/AVR_Mega0/porthardware.h @@ -151,7 +151,7 @@ #undef TICK_INT_vect #undef INT_FLAGS #undef INT_MASK - #undef TICK_init() + #undef TICK_init #error Invalid timer setting. #endif /* if ( configUSE_TIMER_INSTANCE == 0 ) */ -- cgit v1.2.3