compiler/tasking: fix compiler warning on tasking

ctc W549: ["serial/serial.c" 877/37] condition is always true
ctc W549: ["inode/fs_inodesearch.c" 72/8] condition is always true
ctc W545: ["obstack/lib_obstack_malloc.c" 69/1] missing 'return'
ctc W545: ["obstack/lib_obstack_malloc.c" 82/1] missing 'return'

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2024-01-31 09:54:35 +08:00 committed by Xiang Xiao
parent d133de10e6
commit 5424ace1cf
3 changed files with 4 additions and 9 deletions

View file

@ -874,10 +874,8 @@ static ssize_t uart_read(FAR struct file *filep,
{
/* Skipping character count down */
if (dev->escape-- > 0)
{
continue;
}
dev->escape--;
continue;
}
/* Echo if the character is not a control byte */

View file

@ -69,11 +69,6 @@ static int _inode_compare(FAR const char *fname, FAR struct inode *node)
{
FAR char *nname = node->i_name;
if (!nname)
{
return 1;
}
if (!fname)
{
return -1;

View file

@ -66,6 +66,7 @@ FAR void *lib_obstack_malloc(size_t size)
obstack_alloc_failed_handler();
PANIC();
return NULL;
}
FAR void *lib_obstack_realloc(FAR void *ptr, size_t size)
@ -79,4 +80,5 @@ FAR void *lib_obstack_realloc(FAR void *ptr, size_t size)
obstack_alloc_failed_handler();
PANIC();
return NULL;
}