From 09c7373f24cadf4a81b175e1131df8f0e70f5166 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 1 Jul 2015 14:33:37 -0600 Subject: [PATCH] Fix misc. compilation error/warning detected by tools/testbuild.sh --- arch/arm/src/c5471/c5471_ethernet.c | 2 +- arch/arm/src/calypso/calypso_timer.c | 27 +++++++++++++++------------ drivers/net/enc28j60.c | 3 +++ include/nuttx/nx/nxmu.h | 3 +++ net/iob/iob_alloc.c | 2 +- net/iob/iob_alloc_qentry.c | 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 9c34efeb38..a736726bc3 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -1349,7 +1349,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) else #endif #ifdef CONFIG_NET_ARP - else if (BUF->type == HTONS(ETHTYPE_ARP)) + if (BUF->type == HTONS(ETHTYPE_ARP)) { arp_arpin(dev); diff --git a/arch/arm/src/calypso/calypso_timer.c b/arch/arm/src/calypso/calypso_timer.c index a4ddcfddc7..e1a2fcdf46 100644 --- a/arch/arm/src/calypso/calypso_timer.c +++ b/arch/arm/src/calypso/calypso_timer.c @@ -116,22 +116,25 @@ uint16_t hwtimer_read(int num) #define BASE_ADDR_WDOG 0xfffff800 #define WDOG_REG(m) (BASE_ADDR_WDOG + m) -enum wdog_reg { - WD_CNTL_TIMER = CNTL_TIMER, - WD_LOAD_TIMER = LOAD_TIMER, - WD_READ_TIMER = 0x02, - WD_MODE = 0x04, +enum wdog_reg +{ + WD_CNTL_TIMER = CNTL_TIMER, + WD_LOAD_TIMER = LOAD_TIMER, + WD_READ_TIMER = 0x02, + WD_MODE = 0x04, }; -enum wdog_ctl { - WD_CTL_START = (1 << 7), - WD_CTL_AUTO_RELOAD = (1 << 8) +enum wdog_ctl +{ + WD_CTL_START = (1 << 7), + WD_CTL_AUTO_RELOAD = (1 << 8) }; -enum wdog_mode { - WD_MODE_DIS_ARM = 0xF5, - WD_MODE_DIS_CONFIRM = 0xA0, - WD_MODE_ENABLE = (1 << 15) +enum wdog_mode +{ + WD_MODE_DIS_ARM = 0xF5, + WD_MODE_DIS_CONFIRM = 0xA0, + WD_MODE_ENABLE = (1 << 15) }; #define WD_CTL_PRESCALE(value) (((value)&0x07) << 9) diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index bb1834cd12..34bffa07c7 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -1929,6 +1929,7 @@ static void enc_toworker(FAR void *arg) DEBUGASSERT(ret == OK); ret = enc_ifup(&priv->dev); DEBUGASSERT(ret == OK); + UNUSED(ret); /* Then poll uIP for new XMIT data */ @@ -1977,6 +1978,7 @@ static void enc_txtimeout(int argc, uint32_t arg, ...) ret = work_queue(HPWORK, &priv->towork, enc_toworker, (FAR void *)priv, 0); DEBUGASSERT(ret == OK); + UNUSED(ret); } /**************************************************************************** @@ -2071,6 +2073,7 @@ static void enc_polltimer(int argc, uint32_t arg, ...) ret = work_queue(HPWORK, &priv->pollwork, enc_pollworker, (FAR void *)priv, 0); DEBUGASSERT(ret == OK); + UNUSED(ret); } /**************************************************************************** diff --git a/include/nuttx/nx/nxmu.h b/include/nuttx/nx/nxmu.h index 436c18a091..49940aafd9 100644 --- a/include/nuttx/nx/nxmu.h +++ b/include/nuttx/nx/nxmu.h @@ -49,6 +49,8 @@ #include +#ifdef CONFIG_NX_MULTIUSER + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -565,4 +567,5 @@ int nxmu_sendwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg, } #endif +#endif /* CONFIG_NX_MULTIUSER */ #endif /* __INCLUDE_NUTTX_NX_NXMU_H */ diff --git a/net/iob/iob_alloc.c b/net/iob/iob_alloc.c index e6ad9de3c5..9fd2c0e13e 100644 --- a/net/iob/iob_alloc.c +++ b/net/iob/iob_alloc.c @@ -88,7 +88,7 @@ static FAR struct iob_s *iob_allocwait(bool throttled) FAR struct iob_s *iob; irqstate_t flags; FAR sem_t *sem; - int ret; + int ret = OK; #if CONFIG_IOB_THROTTLE > 0 /* Select the semaphore count to check. */ diff --git a/net/iob/iob_alloc_qentry.c b/net/iob/iob_alloc_qentry.c index cd92eb5de8..64efefa93d 100644 --- a/net/iob/iob_alloc_qentry.c +++ b/net/iob/iob_alloc_qentry.c @@ -90,7 +90,7 @@ static FAR struct iob_qentry_s *iob_allocwait_qentry(void) { FAR struct iob_qentry_s *qentry; irqstate_t flags; - int ret; + int ret = OK; /* The following must be atomic; interrupt must be disabled so that there * is no conflict with interrupt level I/O buffer chain container