diff --git a/fs/nxffs/nxffs_stat.c b/fs/nxffs/nxffs_stat.c index 656da395a4..2a5b610449 100644 --- a/fs/nxffs/nxffs_stat.c +++ b/fs/nxffs/nxffs_stat.c @@ -151,7 +151,6 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath, memset(buf, 0, sizeof(struct stat)); buf->st_blksize = volume->geo.blocksize; - buf->st_blocks = entry.datlen / (volume->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR); /* The requested directory must be the volume-relative "root" directory */ @@ -166,6 +165,7 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath, goto errout_with_semaphore; } + buf->st_blocks = entry.datlen / (volume->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR); buf->st_mode = S_IFREG|S_IXOTH|S_IXGRP|S_IXUSR; buf->st_size = entry.datlen; buf->st_atime = entry.utc; diff --git a/libc/syslog/lib_syslog.c b/libc/syslog/lib_syslog.c index 6364010461..4ec5443292 100644 --- a/libc/syslog/lib_syslog.c +++ b/libc/syslog/lib_syslog.c @@ -108,7 +108,7 @@ static inline int vsyslog_internal(FAR const char *fmt, va_list ap) /* Get the current time */ - ret = clock_systimespec(&ts); + (void)clock_systimespec(&ts); #endif #if defined(CONFIG_SYSLOG) diff --git a/libc/unistd/lib_execl.c b/libc/unistd/lib_execl.c index ba5551066f..a6b908234e 100644 --- a/libc/unistd/lib_execl.c +++ b/libc/unistd/lib_execl.c @@ -146,6 +146,7 @@ int execl(FAR const char *path, ...) if (++nargs > MAX_EXECL_ARGS) { set_errno(E2BIG); + va_end(ap); return ERROR; } } diff --git a/net/iob/iob_trimtail.c b/net/iob/iob_trimtail.c index c436550a8c..36eebb26f8 100644 --- a/net/iob/iob_trimtail.c +++ b/net/iob/iob_trimtail.c @@ -86,7 +86,6 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) FAR struct iob_s *entry; FAR struct iob_s *penultimate; FAR struct iob_s *last; - unsigned int iosize; int len; nlldbg("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); @@ -105,14 +104,9 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) penultimate = NULL; last = NULL; - iosize = 0; for (entry = iob; entry; entry = entry->io_flink) { - /* Accumulate the total size of all buffers in the list */ - - iosize += entry->io_len; - /* Remember the last and the next to the last in the chain */ penultimate = last; diff --git a/net/route/netdev_router.c b/net/route/netdev_router.c index d49c1e4d0d..67e49c67f6 100644 --- a/net/route/netdev_router.c +++ b/net/route/netdev_router.c @@ -163,7 +163,6 @@ void netdev_router(FAR struct net_driver_s *dev, net_ipaddr_t target, #else net_ipaddr_copy(*router, match.target); #endif - ret = OK; } else { diff --git a/sched/init/os_start.c b/sched/init/os_start.c index f48bea318f..561e79b9b5 100644 --- a/sched/init/os_start.c +++ b/sched/init/os_start.c @@ -341,6 +341,7 @@ void os_start(void) sem_initialize(); +#if defined(MM_KERNEL_USRHEAP_INIT) || defined(CONFIG_MM_KERNEL_HEAP) || defined(CONFIG_MM_PGALLOC) /* Initialize the memory manager */ { @@ -375,6 +376,7 @@ void os_start(void) mm_pginitialize(heap_start, heap_size); #endif } +#endif #if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) /* Initialize tasking data structures */ diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index 2b1117fecb..d56827ed19 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -467,12 +467,9 @@ static void sched_timer_start(unsigned int ticks) ret = up_timer_start(&ts); #endif - /* [Re-]start the interval timer */ - - ret = up_timer_start(&ts); if (ret < 0) { - slldbg("ERROR: up_timer_start failed: %d\n"); + slldbg("ERROR: up_timer_start/up_alarm_start failed: %d\n"); UNUSED(ret); } } diff --git a/sched/wdog/wd_start.c b/sched/wdog/wd_start.c index 25d8294092..6faf0e6dfc 100644 --- a/sched/wdog/wd_start.c +++ b/sched/wdog/wd_start.c @@ -452,7 +452,7 @@ unsigned int wd_timer(int ticks) /* There are. Decrement the lag counter */ wdog->lag -= decr; - ticks -= ticks; + ticks -= decr; /* Check if the watchdog at the head of the list is ready to run */ diff --git a/sched/wqueue/kwork_inherit.c b/sched/wqueue/kwork_inherit.c index e4df5e1f48..c169d877ca 100644 --- a/sched/wqueue/kwork_inherit.c +++ b/sched/wqueue/kwork_inherit.c @@ -176,9 +176,11 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio) static void lpwork_restoreworker(pid_t wpid, uint8_t reqprio) { FAR struct tcb_s *wtcb; +#if CONFIG_SEM_NNESTPRIO > 0 uint8_t wpriority; int index; int selected; +#endif /* Get the TCB of the low priority worker thread from the process ID. */