kernel; Checking functions return

Checking the return of some scattered functions across kernel.
MISRA-C requires that all non-void functions have their return value
checked, though, in some cases there is nothing to do. Just
acknowledging it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-13 11:24:30 -07:00 committed by Anas Nashif
commit 0a4478434e
4 changed files with 6 additions and 6 deletions

View file

@ -51,7 +51,7 @@ void _sys_device_do_config_level(int level)
info++) {
struct device_config *device = info->config;
device->init(info);
(void)device->init(info);
_k_object_init(info);
}
}

View file

@ -35,7 +35,7 @@ K_STACK_DEFINE(async_msg_free, CONFIG_NUM_MBOX_ASYNC_MSGS);
/* allocate an asynchronous message descriptor */
static inline void mbox_async_alloc(struct k_mbox_async **async)
{
k_stack_pop(&async_msg_free, (u32_t *)async, K_FOREVER);
(void)k_stack_pop(&async_msg_free, (u32_t *)async, K_FOREVER);
}
/* free an asynchronous message descriptor */
@ -332,7 +332,7 @@ void k_mbox_async_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
async->tx_msg._syncing_thread = (struct k_thread *)&async->thread;
async->tx_msg._async_sem = sem;
mbox_message_put(mbox, &async->tx_msg, K_FOREVER);
(void)mbox_message_put(mbox, &async->tx_msg, K_FOREVER);
}
#endif

View file

@ -54,7 +54,7 @@ K_STACK_DEFINE(pipe_async_msgs, CONFIG_NUM_PIPE_ASYNC_MSGS);
/* Allocate an asynchronous message descriptor */
static void pipe_async_alloc(struct k_pipe_async **async)
{
k_stack_pop(&pipe_async_msgs, (u32_t *)async, K_FOREVER);
(void)k_stack_pop(&pipe_async_msgs, (u32_t *)async, K_FOREVER);
}
/* Free an asynchronous message descriptor */

View file

@ -96,7 +96,7 @@ void smp_init(void)
{
atomic_t start_flag;
atomic_clear(&start_flag);
(void)atomic_clear(&start_flag);
#if defined(CONFIG_SMP) && CONFIG_MP_NUM_CPUS > 1
_arch_start_cpu(1, _interrupt_stack1, CONFIG_ISR_STACK_SIZE,
@ -113,5 +113,5 @@ void smp_init(void)
smp_init_top, &start_flag);
#endif
atomic_set(&start_flag, 1);
(void)atomic_set(&start_flag, 1);
}