fix variable set but not used
These variables will trigger variable 'ret' set but not used warnings due to different configurations. Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
3b6e7c1927
commit
d2d93ba58c
@ -454,7 +454,6 @@ static ssize_t memdump_write(FAR struct file *filep, FAR const char *buffer,
|
||||
size_t buflen)
|
||||
{
|
||||
FAR struct procfs_meminfo_entry_s *entry;
|
||||
FAR struct meminfo_file_s *procfile;
|
||||
struct mm_memdump_s dump =
|
||||
{
|
||||
PID_MM_ALLOC,
|
||||
@ -475,8 +474,7 @@ static ssize_t memdump_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
procfile = filep->f_priv;
|
||||
DEBUGASSERT(procfile);
|
||||
DEBUGASSERT(filep->f_priv);
|
||||
|
||||
#if CONFIG_MM_BACKTRACE > 0
|
||||
if (strcmp(buffer, "on") == 0)
|
||||
|
@ -55,6 +55,7 @@ void mm_foreach(FAR struct mm_heap_s *heap, mm_node_handler_t handler,
|
||||
# define region 0
|
||||
#endif
|
||||
|
||||
UNUSED(prev);
|
||||
DEBUGASSERT(handler);
|
||||
|
||||
/* Visit each region */
|
||||
|
@ -65,7 +65,7 @@ static void mallinfo_handler(FAR struct mm_allocnode_s *node, FAR void *arg)
|
||||
else
|
||||
{
|
||||
FAR struct mm_freenode_s *fnode = (FAR void *)node;
|
||||
|
||||
UNUSED(fnode);
|
||||
DEBUGASSERT(nodesize >= MM_MIN_CHUNK);
|
||||
DEBUGASSERT(fnode->blink->flink == fnode);
|
||||
DEBUGASSERT(MM_SIZEOF_NODE(fnode->blink) <= nodesize);
|
||||
|
@ -104,7 +104,7 @@ static void memdump_handler(FAR struct mm_allocnode_s *node, FAR void *arg)
|
||||
else if (dump->pid == PID_MM_FREE)
|
||||
{
|
||||
FAR struct mm_freenode_s *fnode = (FAR void *)node;
|
||||
|
||||
UNUSED(fnode);
|
||||
DEBUGASSERT(nodesize >= MM_MIN_CHUNK);
|
||||
DEBUGASSERT(fnode->blink->flink == fnode);
|
||||
DEBUGASSERT(MM_SIZEOF_NODE(fnode->blink) <= nodesize);
|
||||
|
@ -307,6 +307,7 @@ static inline void nx_start_application(void)
|
||||
posix_spawnattr_t attr;
|
||||
#endif
|
||||
int ret;
|
||||
UNUSED(ret);
|
||||
|
||||
#ifdef CONFIG_ETC_ROMFS
|
||||
nx_romfsetc();
|
||||
|
@ -55,12 +55,10 @@
|
||||
|
||||
void nxsched_remove_blocked(FAR struct tcb_s *btcb)
|
||||
{
|
||||
tstate_t task_state = btcb->task_state;
|
||||
|
||||
/* Make sure the TCB is in a valid blocked state */
|
||||
|
||||
DEBUGASSERT(task_state >= FIRST_BLOCKED_STATE &&
|
||||
task_state <= LAST_BLOCKED_STATE);
|
||||
DEBUGASSERT(btcb->task_state >= FIRST_BLOCKED_STATE &&
|
||||
btcb->task_state <= LAST_BLOCKED_STATE);
|
||||
|
||||
/* Remove the TCB from the blocked task list associated
|
||||
* with this state
|
||||
|
Loading…
Reference in New Issue
Block a user