Skip to content

Commit d6a0fef

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cores/esp32/esp32-hal-spi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,16 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t
661661
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI01_RST);
662662
}
663663
#elif CONFIG_IDF_TARGET_ESP32P4
664+
#pragma GCC diagnostic push
665+
#pragma GCC diagnostic ignored "-Wunused-variable"
664666
if (spi_num == FSPI) {
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
}
@@ -683,6 +685,7 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t
683685
}
684686
}
685687
}
688+
#pragma GCC diagnostic pop
686689
#elif defined(__PERIPH_CTRL_ALLOW_LEGACY_API)
687690
periph_ll_reset(PERIPH_SPI2_MODULE);
688691
periph_ll_enable_clk_clear_rst(PERIPH_SPI2_MODULE);

0 commit comments

Comments
 (0)