From 2596ccd448f17715f25a23198b2aa5a418484127 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 5 Apr 2023 07:34:14 +1000 Subject: [PATCH] Hoist warning ignore to wait.h --- platforms/avr/_wait.h | 4 ++++ tmk_core/protocol/usb_hid/override_wiring.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platforms/avr/_wait.h b/platforms/avr/_wait.h index c1a598a428a8..39cbf618d213 100644 --- a/platforms/avr/_wait.h +++ b/platforms/avr/_wait.h @@ -15,7 +15,11 @@ */ #pragma once +// Need to disable GCC's "maybe-uninitialized" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #include +#pragma GCC diagnostic pop // http://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf // page 22: Table 4-2. Arithmetic and Logic Instructions diff --git a/tmk_core/protocol/usb_hid/override_wiring.c b/tmk_core/protocol/usb_hid/override_wiring.c index 11c799231791..159e549511ee 100644 --- a/tmk_core/protocol/usb_hid/override_wiring.c +++ b/tmk_core/protocol/usb_hid/override_wiring.c @@ -3,11 +3,7 @@ */ #define __DELAY_BACKWARD_COMPATIBLE__ -// Need to disable GCC's "maybe-uninitialized" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#include -#pragma GCC diagnostic pop +#include #include "platforms/timer.h" @@ -32,3 +28,4 @@ void init(void) { timer_init(); } + \ No newline at end of file