diff options
author | Nick Brassel <nick@tzarc.org> | 2023-04-05 14:59:09 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 14:59:09 +1000 |
commit | 06c5c028046adc0a5501f6ac51953640e2015020 (patch) | |
tree | 9c5b9ebb54a2b071be29eaec22551c4f6924b8c4 /platforms | |
parent | f1dbffe367ca3b2affbcdc5f7e5027f32d2e655d (diff) |
Disable specific warnings to mitigate compilation problems with `KEEP_INTERMEDIATES=yes`. (#20339)
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/avr/_wait.h | 4 | ||||
-rw-r--r-- | platforms/chibios/drivers/audio_dac_additive.c | 6 | ||||
-rw-r--r-- | platforms/chibios/drivers/audio_dac_basic.c | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/platforms/avr/_wait.h b/platforms/avr/_wait.h index c1a598a428..39cbf618d2 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 <util/delay.h> +#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/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c index 68ce13788e..d29147ca3b 100644 --- a/platforms/chibios/drivers/audio_dac_additive.c +++ b/platforms/chibios/drivers/audio_dac_additive.c @@ -19,6 +19,10 @@ #include <ch.h> #include <hal.h> +// Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtautological-compare" + /* Audio Driver: DAC @@ -335,3 +339,5 @@ void audio_driver_start(void) { active_tones_snapshot_length = 0; state = OUTPUT_SHOULD_START; } + +#pragma GCC diagnostic pop diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c index 5f0cbf8f84..4ea23a2158 100644 --- a/platforms/chibios/drivers/audio_dac_basic.c +++ b/platforms/chibios/drivers/audio_dac_basic.c @@ -19,6 +19,10 @@ #include "ch.h" #include "hal.h" +// Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtautological-compare" + /* Audio Driver: DAC @@ -247,3 +251,5 @@ void audio_driver_start(void) { } gptStartContinuous(&AUDIO_STATE_TIMER, 2U); } + +#pragma GCC diagnostic pop |