Revert "fix variable set but not used"

This reverts commit d2d93ba58c.
This commit is contained in:
Masayuki Ishikawa 2024-02-22 10:32:37 +09:00 committed by Xiang Xiao
parent ae730ac246
commit e67d32a5ba
6 changed files with 9 additions and 7 deletions

View File

@ -454,6 +454,7 @@ 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,
@ -474,7 +475,8 @@ static ssize_t memdump_write(FAR struct file *filep, FAR const char *buffer,
/* Recover our private data from the struct file instance */
DEBUGASSERT(filep->f_priv);
procfile = filep->f_priv;
DEBUGASSERT(procfile);
#if CONFIG_MM_BACKTRACE > 0
if (strcmp(buffer, "on") == 0)

View File

@ -55,7 +55,6 @@ 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 */

View File

@ -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);

View File

@ -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);

View File

@ -307,7 +307,6 @@ static inline void nx_start_application(void)
posix_spawnattr_t attr;
#endif
int ret;
UNUSED(ret);
#ifdef CONFIG_ETC_ROMFS
nx_romfsetc();

View File

@ -55,10 +55,12 @@
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(btcb->task_state >= FIRST_BLOCKED_STATE &&
btcb->task_state <= LAST_BLOCKED_STATE);
DEBUGASSERT(task_state >= FIRST_BLOCKED_STATE &&
task_state <= LAST_BLOCKED_STATE);
/* Remove the TCB from the blocked task list associated
* with this state