From 198e32b42853a507d1482766a6b8c96731038c59 Mon Sep 17 00:00:00 2001 From: Nicolas Norvez Date: Thu, 21 Feb 2019 19:02:58 -0800 Subject: stm32: spi: fix unused variable error Don't error out when building for STM32F412. BRANCH=none BUG=none TEST=hatch_fp firmware builds successfully Change-Id: I996a39a6319b7ad5bbfae7e0c7b7746e3f3a243d Signed-off-by: Nicolas Norvez Reviewed-on: https://chromium-review.googlesource.com/1482058 Reviewed-by: Aseda Aboagye --- chip/stm32/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c index eda4e0960f..7873fe7772 100644 --- a/chip/stm32/spi.c +++ b/chip/stm32/spi.c @@ -279,7 +279,7 @@ static void reply(dma_chan_t *txdma, */ static void tx_status(uint8_t byte) { - stm32_spi_regs_t *spi = STM32_SPI1_REGS; + stm32_spi_regs_t *spi __attribute__((unused)) = STM32_SPI1_REGS; SPI_TXDR = byte; #if defined(CHIP_FAMILY_STM32F0) || defined(CHIP_FAMILY_STM32L4) @@ -302,7 +302,7 @@ static void tx_status(uint8_t byte) */ static void setup_for_transaction(void) { - stm32_spi_regs_t *spi = STM32_SPI1_REGS; + stm32_spi_regs_t *spi __attribute__((unused)) = STM32_SPI1_REGS; volatile uint8_t dummy __attribute__((unused)); /* clear this as soon as possible */ -- cgit v1.2.1