Skip to content

Commit 3cb2c39

Browse files
committed
fix(ci): Ignore unused-variable warning
1 parent ab79956 commit 3cb2c39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cores/esp32/esp32-hal-spi.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,17 +662,22 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t
662662
}
663663
#elif CONFIG_IDF_TARGET_ESP32P4
664664
if (spi_num == FSPI) {
665+
#pragma GCC diagnostic push
666+
#pragma GCC diagnostic ignored "-Wunused-variable"
665667
PERIPH_RCC_ACQUIRE_ATOMIC(PERIPH_GPSPI2_MODULE, ref_count) {
666668
if (ref_count == 0) {
667669
PERIPH_RCC_ATOMIC() {
668670
spi_ll_enable_bus_clock(SPI2_HOST, true);
669671
spi_ll_reset_register(SPI2_HOST);
670672
spi_ll_enable_clock(SPI2_HOST, true);
671-
673+
672674
}
673675
}
674676
}
677+
#pragma GCC diagnostic pop
675678
} else if (spi_num == HSPI) {
679+
#pragma GCC diagnostic push
680+
#pragma GCC diagnostic ignored "-Wunused-variable"
676681
PERIPH_RCC_ACQUIRE_ATOMIC(PERIPH_GPSPI3_MODULE, ref_count) {
677682
if (ref_count == 0) {
678683
PERIPH_RCC_ATOMIC() {
@@ -682,6 +687,7 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t
682687
}
683688
}
684689
}
690+
#pragma GCC diagnostic pop
685691
}
686692
#elif defined(__PERIPH_CTRL_ALLOW_LEGACY_API)
687693
periph_ll_reset(PERIPH_SPI2_MODULE);

0 commit comments

Comments
 (0)