diff --git a/targets/TARGET_STM/i2c_api.c b/targets/TARGET_STM/i2c_api.c index e4ef911b03..a1b55ff818 100644 --- a/targets/TARGET_STM/i2c_api.c +++ b/targets/TARGET_STM/i2c_api.c @@ -562,7 +562,6 @@ i2c_t *get_i2c_obj(I2C_HandleTypeDef *hi2c) void i2c_reset(i2c_t *obj) { - struct i2c_s *obj_s = I2C_S(obj); /* As recommended in i2c_api.h, mainly send stop */ i2c_stop(obj); /* then re-init */ diff --git a/targets/TARGET_STM/stm_spi_api.c b/targets/TARGET_STM/stm_spi_api.c index d6d2aaa4d0..d2b1221a03 100644 --- a/targets/TARGET_STM/stm_spi_api.c +++ b/targets/TARGET_STM/stm_spi_api.c @@ -105,7 +105,6 @@ void spi_get_capabilities(PinName ssel, bool slave, spi_capabilities_t *cap) // check if given ssel pin is in the cs pinmap const PinMap *cs_pins = spi_master_cs_pinmap(); - PinName pin = NC; while (cs_pins->pin != NC) { if (cs_pins->pin == ssel) { #if DEVICE_SPISLAVE