From a08a70a3fa9eb4b65ff46ccf959d893e748ffda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= <joakim.nohlgard@eistec.se> Date: Fri, 13 Jan 2017 08:58:30 +0100 Subject: [PATCH] drivers/at86rf2xx: Fix -Wsign-compare warning, add missing parentheses --- drivers/at86rf2xx/at86rf2xx.c | 2 +- drivers/at86rf2xx/at86rf2xx_netdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/at86rf2xx/at86rf2xx.c b/drivers/at86rf2xx/at86rf2xx.c index fbd06d80d9..a34e802aee 100644 --- a/drivers/at86rf2xx/at86rf2xx.c +++ b/drivers/at86rf2xx/at86rf2xx.c @@ -77,7 +77,7 @@ void at86rf2xx_reset(at86rf2xx_t *dev) cpuid_get(cpuid); #if CPUID_LEN > IEEE802154_LONG_ADDRESS_LEN - for (int i = IEEE802154_LONG_ADDRESS_LEN; i < CPUID_LEN; i++) { + for (unsigned int i = IEEE802154_LONG_ADDRESS_LEN; i < CPUID_LEN; i++) { cpuid[i & 0x07] ^= cpuid[i]; } #endif diff --git a/drivers/at86rf2xx/at86rf2xx_netdev.c b/drivers/at86rf2xx/at86rf2xx_netdev.c index 7e73624a6f..180d454606 100644 --- a/drivers/at86rf2xx/at86rf2xx_netdev.c +++ b/drivers/at86rf2xx/at86rf2xx_netdev.c @@ -434,8 +434,8 @@ static int _set(netdev2_t *netdev, netopt_t opt, void *val, size_t len) } else { uint8_t chan = ((uint8_t *)val)[0]; - if (chan < AT86RF2XX_MIN_CHANNEL || - chan > AT86RF2XX_MAX_CHANNEL) { + if ((chan < AT86RF2XX_MIN_CHANNEL) || + (chan > AT86RF2XX_MAX_CHANNEL)) { res = -EINVAL; break; } -- GitLab