From 81feb558ef3177f9b7a160f885909cd634b79367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Sun, 17 Jan 2016 12:04:34 +0100 Subject: [PATCH] cpu/stm32f0: spi: Cast enum to unsigned int for comparison --- cpu/stm32f0/periph/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/stm32f0/periph/spi.c b/cpu/stm32f0/periph/spi.c index 6a337c97d2..3b35557dd3 100644 --- a/cpu/stm32f0/periph/spi.c +++ b/cpu/stm32f0/periph/spi.c @@ -162,7 +162,7 @@ int spi_conf_pins(spi_t dev) int spi_acquire(spi_t dev) { - if (dev >= SPI_NUMOF) { + if ((unsigned int)dev >= SPI_NUMOF) { return -1; } mutex_lock(&locks[dev]); @@ -171,7 +171,7 @@ int spi_acquire(spi_t dev) int spi_release(spi_t dev) { - if (dev >= SPI_NUMOF) { + if ((unsigned int)dev >= SPI_NUMOF) { return -1; } mutex_unlock(&locks[dev]);