From eff01f21f89c7d0a8b4bb44c5db41230462f5fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 1 Jun 2016 16:40:28 +0200 Subject: [PATCH] cpu/cc26x0: Cast gpio_t to unsigned int for comparison --- cpu/cc26x0/periph/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/cc26x0/periph/gpio.c b/cpu/cc26x0/periph/gpio.c index b277af8c58..0759f5cb60 100644 --- a/cpu/cc26x0/periph/gpio.c +++ b/cpu/cc26x0/periph/gpio.c @@ -34,7 +34,7 @@ static gpio_isr_ctx_t gpio_chan[GPIO_ISR_CHAN_NUMOF]; int gpio_init(gpio_t pin, gpio_mode_t mode) { - if ((pin < 0) || (pin > 31)) + if ((unsigned int)pin > 31) return -1; /* enable GPIO clock */