diff --git a/drivers/misc/dev_null.c b/drivers/misc/dev_null.c index 5bb27a746c3..8e7c5e90d74 100644 --- a/drivers/misc/dev_null.c +++ b/drivers/misc/dev_null.c @@ -74,6 +74,10 @@ static const struct file_operations devnull_fops = static ssize_t devnull_read(FAR struct file *filep, FAR char *buffer, size_t len) { + UNUSED(filep); + UNUSED(buffer); + UNUSED(len); + return 0; /* Return EOF */ } @@ -84,6 +88,9 @@ static ssize_t devnull_read(FAR struct file *filep, FAR char *buffer, static ssize_t devnull_write(FAR struct file *filep, FAR const char *buffer, size_t len) { + UNUSED(filep); + UNUSED(buffer); + return len; /* Say that everything was written */ } @@ -94,6 +101,8 @@ static ssize_t devnull_write(FAR struct file *filep, FAR const char *buffer, static int devnull_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) { + UNUSED(filep); + if (setup) { fds->revents |= (fds->events & (POLLIN | POLLOUT)); diff --git a/drivers/misc/dev_zero.c b/drivers/misc/dev_zero.c index 4ceab41c816..882fb60a5f1 100644 --- a/drivers/misc/dev_zero.c +++ b/drivers/misc/dev_zero.c @@ -74,6 +74,8 @@ static const struct file_operations devzero_fops = static ssize_t devzero_read(FAR struct file *filep, FAR char *buffer, size_t len) { + UNUSED(filep); + memset(buffer, 0, len); return len; } @@ -85,6 +87,9 @@ static ssize_t devzero_read(FAR struct file *filep, FAR char *buffer, static ssize_t devzero_write(FAR struct file *filep, FAR const char *buffer, size_t len) { + UNUSED(filep); + UNUSED(buffer); + return len; } @@ -95,6 +100,8 @@ static ssize_t devzero_write(FAR struct file *filep, FAR const char *buffer, static int devzero_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) { + UNUSED(filep); + if (setup) { fds->revents |= (fds->events & (POLLIN | POLLOUT)); diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index d5f938a926c..41d24d073a1 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -229,6 +229,7 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel, nxsem_post(&sem); #endif + UNUSED(channel); return buflen; } #endif diff --git a/drivers/syslog/syslog_device.c b/drivers/syslog/syslog_device.c index cbfa2e2a456..d52ae7bb31f 100644 --- a/drivers/syslog/syslog_device.c +++ b/drivers/syslog/syslog_device.c @@ -658,6 +658,8 @@ static int syslog_dev_flush(FAR struct syslog_channel_s *channel) */ file_fsync(&syslog_dev->sl_file); +#else + UNUSED(channel); #endif return OK; diff --git a/libs/libc/grp/lib_initgroups.c b/libs/libc/grp/lib_initgroups.c index d1dd6848278..0ef1f0b57f3 100644 --- a/libs/libc/grp/lib_initgroups.c +++ b/libs/libc/grp/lib_initgroups.c @@ -55,5 +55,7 @@ int initgroups(FAR const char *user, gid_t group) * Thus, just ignore this request silently and report success. */ + UNUSED(user); + UNUSED(group); return 0; } diff --git a/libs/libc/misc/lib_glob.c b/libs/libc/misc/lib_glob.c index 3bf8170c651..e4066203832 100644 --- a/libs/libc/misc/lib_glob.c +++ b/libs/libc/misc/lib_glob.c @@ -366,6 +366,9 @@ static int do_glob(FAR char *buf, size_t pos, int type, FAR char *pat, static int ignore_err(FAR const char *path, int err) { + UNUSED(path); + UNUSED(err); + return 0; } diff --git a/libs/libc/misc/lib_mknod.c b/libs/libc/misc/lib_mknod.c index 3ddb81b91ab..538fefdd214 100644 --- a/libs/libc/misc/lib_mknod.c +++ b/libs/libc/misc/lib_mknod.c @@ -55,7 +55,8 @@ * * Input Parameters: * pathname - The full path to node. - * mode - File type and permission + * mode - File type and permission. + * dev - Ignored. * * Returned Value: * 0 is returned on success; otherwise, -1 is returned with errno set @@ -67,6 +68,8 @@ int mknod(FAR const char *path, mode_t mode, dev_t dev) { int ret = -1; + UNUSED(dev); + switch (mode & S_IFMT) { #if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0 diff --git a/libs/libc/pthread/pthread_atfork.c b/libs/libc/pthread/pthread_atfork.c index a3dd269a585..93d9d56dd36 100644 --- a/libs/libc/pthread/pthread_atfork.c +++ b/libs/libc/pthread/pthread_atfork.c @@ -34,5 +34,9 @@ int pthread_atfork(CODE void (*prepare)(void), { /* fork isn't supported yet, so the dummy implementation is enough. */ + UNUSED(prepare); + UNUSED(parent); + UNUSED(child); + return 0; } diff --git a/libs/libc/pthread/pthread_barrierinit.c b/libs/libc/pthread/pthread_barrierinit.c index f737b322b5f..db1f6d3d999 100644 --- a/libs/libc/pthread/pthread_barrierinit.c +++ b/libs/libc/pthread/pthread_barrierinit.c @@ -75,6 +75,8 @@ int pthread_barrier_init(FAR pthread_barrier_t *barrier, { int ret = OK; + UNUSED(attr); + if (!barrier || count == 0) { ret = EINVAL; diff --git a/libs/libc/semaphore/sem_init.c b/libs/libc/semaphore/sem_init.c index 6243e12333a..785403599d9 100644 --- a/libs/libc/semaphore/sem_init.c +++ b/libs/libc/semaphore/sem_init.c @@ -61,6 +61,8 @@ int nxsem_init(FAR sem_t *sem, int pshared, unsigned int value) { + UNUSED(pshared); + /* Verify that a semaphore was provided and the count is within the valid * range. */ diff --git a/libs/libc/stream/lib_libnoflush.c b/libs/libc/stream/lib_libnoflush.c index 450941e2f72..abfcb616361 100644 --- a/libs/libc/stream/lib_libnoflush.c +++ b/libs/libc/stream/lib_libnoflush.c @@ -52,5 +52,6 @@ int lib_noflush(FAR struct lib_outstream_s *this) { + UNUSED(this); return OK; } diff --git a/libs/libc/stream/lib_libsnoflush.c b/libs/libc/stream/lib_libsnoflush.c index 67852e26a44..7b1d1574559 100644 --- a/libs/libc/stream/lib_libsnoflush.c +++ b/libs/libc/stream/lib_libsnoflush.c @@ -51,5 +51,6 @@ int lib_snoflush(FAR struct lib_sostream_s *this) { + UNUSED(this); return OK; } diff --git a/libs/libc/stream/lib_nullinstream.c b/libs/libc/stream/lib_nullinstream.c index d74fcf9a44a..9dd1f3c406a 100644 --- a/libs/libc/stream/lib_nullinstream.c +++ b/libs/libc/stream/lib_nullinstream.c @@ -33,6 +33,7 @@ static int nullinstream_getc(FAR struct lib_instream_s *this) { + UNUSED(this); return EOF; } diff --git a/libs/libc/stream/lib_nulloutstream.c b/libs/libc/stream/lib_nulloutstream.c index 5e7f198cfad..692ff185ca1 100644 --- a/libs/libc/stream/lib_nulloutstream.c +++ b/libs/libc/stream/lib_nulloutstream.c @@ -34,6 +34,7 @@ static void nulloutstream_putc(FAR struct lib_outstream_s *this, int ch) { + UNUSED(ch); DEBUGASSERT(this); this->nput++; } diff --git a/libs/libc/string/lib_strerror.c b/libs/libc/string/lib_strerror.c index bf1ee824fec..74386d618b7 100644 --- a/libs/libc/string/lib_strerror.c +++ b/libs/libc/string/lib_strerror.c @@ -365,6 +365,8 @@ FAR char *strerror(int errnum) } } while (ndxlow <= ndxhi); +#else + UNUSED(errnum); #endif return "Unknown error"; } diff --git a/libs/libc/time/lib_gettimeofday.c b/libs/libc/time/lib_gettimeofday.c index 3851704a0a3..78ad7e7a7ac 100644 --- a/libs/libc/time/lib_gettimeofday.c +++ b/libs/libc/time/lib_gettimeofday.c @@ -60,6 +60,8 @@ int gettimeofday(FAR struct timeval *tv, FAR struct timezone *tz) struct timespec ts; int ret; + UNUSED(tz); + #ifdef CONFIG_DEBUG_FEATURES if (!tv) { diff --git a/libs/libc/time/lib_settimeofday.c b/libs/libc/time/lib_settimeofday.c index 1a623557f1d..8e0b33e4017 100644 --- a/libs/libc/time/lib_settimeofday.c +++ b/libs/libc/time/lib_settimeofday.c @@ -58,6 +58,8 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz) { struct timespec ts; + UNUSED(tz); + #ifdef CONFIG_DEBUG_FEATURES if (!tv || tv->tv_usec >= USEC_PER_SEC) { diff --git a/libs/libc/unistd/lib_getrlimit.c b/libs/libc/unistd/lib_getrlimit.c index 2696288cf46..efcd1fcdd20 100644 --- a/libs/libc/unistd/lib_getrlimit.c +++ b/libs/libc/unistd/lib_getrlimit.c @@ -44,6 +44,8 @@ int getrlimit(int resource, FAR struct rlimit *rlp) { + UNUSED(resource); + if (rlp == NULL) { set_errno(EINVAL); diff --git a/libs/libc/unistd/lib_getrusage.c b/libs/libc/unistd/lib_getrusage.c index ff7f4333eeb..57d44851ba3 100644 --- a/libs/libc/unistd/lib_getrusage.c +++ b/libs/libc/unistd/lib_getrusage.c @@ -48,10 +48,15 @@ * information for the child process is discarded and not included in the * resource information provided by getrusage(). * + * Note: This is currently a dummy implementation and as such does not + * honor the 'who' parameter. + * ****************************************************************************/ int getrusage(int who, FAR struct rusage *r_usage) { + UNUSED(who); + if (r_usage == NULL) { set_errno(EINVAL); diff --git a/libs/libc/unistd/lib_pathconf.c b/libs/libc/unistd/lib_pathconf.c index 621eaa5a8a1..e572cbf68af 100644 --- a/libs/libc/unistd/lib_pathconf.c +++ b/libs/libc/unistd/lib_pathconf.c @@ -112,6 +112,8 @@ long fpathconf(int fildes, int name) * necessary. */ + UNUSED(fildes); + switch (name) { case _PC_PATH_MAX: @@ -143,5 +145,7 @@ long fpathconf(int fildes, int name) long pathconf(FAR const char *path, int name) { + UNUSED(path); + return fpathconf(-1, name); } diff --git a/libs/libc/unistd/lib_setpriority.c b/libs/libc/unistd/lib_setpriority.c index d02c7af41e7..20e4436cff6 100644 --- a/libs/libc/unistd/lib_setpriority.c +++ b/libs/libc/unistd/lib_setpriority.c @@ -58,6 +58,8 @@ int setpriority(int which, id_t who, int value) struct sched_param param; int ret; + UNUSED(which); + if (who == 0) { who = getpid(); diff --git a/libs/libc/unistd/lib_setrlimit.c b/libs/libc/unistd/lib_setrlimit.c index 9d96970c283..8c00c3fff79 100644 --- a/libs/libc/unistd/lib_setrlimit.c +++ b/libs/libc/unistd/lib_setrlimit.c @@ -46,5 +46,8 @@ int setrlimit(int resource, FAR const struct rlimit *rlp) { /* This is a dummy realization to make the compiler happy */ + UNUSED(resource); + UNUSED(rlp); + return OK; } diff --git a/sched/group/group_signal.c b/sched/group/group_signal.c index fdb26e3f8cd..095503bac89 100644 --- a/sched/group/group_signal.c +++ b/sched/group/group_signal.c @@ -270,6 +270,8 @@ errout: #else + UNUSED(group); + UNUSED(siginfo); return -ENOSYS; #endif diff --git a/sched/irq/irq_unexpectedisr.c b/sched/irq/irq_unexpectedisr.c index e0c7187211e..2912cd534e2 100644 --- a/sched/irq/irq_unexpectedisr.c +++ b/sched/irq/irq_unexpectedisr.c @@ -46,6 +46,9 @@ int irq_unexpected_isr(int irq, FAR void *context, FAR void *arg) { + UNUSED(context); + UNUSED(arg); + up_irq_save(); _err("ERROR irq: %d\n", irq); PANIC(); diff --git a/sched/sched/sched_resumescheduler.c b/sched/sched/sched_resumescheduler.c index b9bec06e9ce..4ff4e96613b 100644 --- a/sched/sched/sched_resumescheduler.c +++ b/sched/sched/sched_resumescheduler.c @@ -90,7 +90,7 @@ void nxsched_resume_scheduler(FAR struct tcb_s *tcb) if (tcb->irqcount > 0) { - /* Do notihing here + /* Do nothing here * NOTE: spin_setbit() is done in nxsched_add_readytorun() * and nxsched_remove_readytorun() */ diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index 7f79c941ada..af397ceb259 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -182,7 +182,8 @@ errout: * task_restart() would still be an issue. * * Input Parameters: - * Standard task start-up parameters + * argc, argv - Ignored. The task's start-up parameters are passed via the + * semaphore-protected global structure g_spawn_parms. * * Returned Value: * Standard task return value. @@ -198,6 +199,9 @@ static int nxtask_spawn_proxy(int argc, FAR char *argv[]) * option to change the signal mask was selected. */ + UNUSED(argc); + UNUSED(argv); + DEBUGASSERT(g_spawn_parms.file_actions || (g_spawn_parms.attr && (g_spawn_parms.attr->flags & POSIX_SPAWN_SETSIGMASK) != 0)); diff --git a/sched/timer/timer_getoverrun.c b/sched/timer/timer_getoverrun.c index b9cb48ef4d7..90dae4ae8fc 100644 --- a/sched/timer/timer_getoverrun.c +++ b/sched/timer/timer_getoverrun.c @@ -75,6 +75,7 @@ int timer_getoverrun(timer_t timerid) { + UNUSED(timerid); set_errno(ENOSYS); return ERROR; }