From 9ffcd538682075505752093fe3b9359238ab3102 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 20 Dec 2011 18:35:55 +0100 Subject: [PATCH] Fixed compiler warning (with IAR compiler) --- cpu/msp430/leds-arch.c | 12 +++++------- platform/sentilla-usb/leds-arch.c | 9 ++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cpu/msp430/leds-arch.c b/cpu/msp430/leds-arch.c index e53a9bb17..fe63d8ae4 100644 --- a/cpu/msp430/leds-arch.c +++ b/cpu/msp430/leds-arch.c @@ -29,14 +29,10 @@ * This file is part of the Configurable Sensor Network Application * Architecture for sensor nodes running the Contiki operating system. * - * $Id: leds-arch.c,v 1.1 2006/06/17 22:41:21 adamdunkels Exp $ - * * ----------------------------------------------------------------- * * Author : Adam Dunkels, Joakim Eriksson, Niclas Finne * Created : 2005-11-03 - * Updated : $Date: 2006/06/17 22:41:21 $ - * $Revision: 1.1 $ */ #include "contiki.h" @@ -53,9 +49,11 @@ leds_arch_init(void) unsigned char leds_arch_get(void) { - return ((LEDS_PxOUT & LEDS_CONF_RED) ? 0 : LEDS_RED) - | ((LEDS_PxOUT & LEDS_CONF_GREEN) ? 0 : LEDS_GREEN) - | ((LEDS_PxOUT & LEDS_CONF_YELLOW) ? 0 : LEDS_YELLOW); + unsigned char leds; + leds = LEDS_PxOUT; + return ((leds & LEDS_CONF_RED) ? 0 : LEDS_RED) + | ((leds & LEDS_CONF_GREEN) ? 0 : LEDS_GREEN) + | ((leds & LEDS_CONF_YELLOW) ? 0 : LEDS_YELLOW); } /*---------------------------------------------------------------------------*/ void diff --git a/platform/sentilla-usb/leds-arch.c b/platform/sentilla-usb/leds-arch.c index b4e90afd2..6430f76d6 100644 --- a/platform/sentilla-usb/leds-arch.c +++ b/platform/sentilla-usb/leds-arch.c @@ -28,7 +28,6 @@ * * This file is part of the Contiki operating system. * - * $Id: leds-arch.c,v 1.1 2010/08/25 19:57:33 nifi Exp $ */ /** @@ -43,8 +42,6 @@ #include "contiki-conf.h" #include "dev/leds.h" -#include - /*---------------------------------------------------------------------------*/ void leds_arch_init(void) @@ -56,8 +53,10 @@ leds_arch_init(void) unsigned char leds_arch_get(void) { - return ((LEDS_PxOUT & LEDS_CONF_RED) ? 0 : LEDS_RED) - | ((LEDS_PxOUT & LEDS_CONF_GREEN) ? 0 : LEDS_GREEN); + unsigned char leds; + leds = LEDS_PxOUT; + return ((leds & LEDS_CONF_RED) ? 0 : LEDS_RED) + | ((leds & LEDS_CONF_GREEN) ? 0 : LEDS_GREEN); } /*---------------------------------------------------------------------------*/ void