libc: newlib: libc-hooks: Fix Coverity warning
Suppress the coverity warning on using the semaphore as this semaphore is used and freed only in this function. Fixes: #18960 Signed-off-by: David Leach <david.leach@nxp.com>
This commit is contained in:
parent
469f53c210
commit
2abdc19ceb
1 changed files with 2 additions and 0 deletions
|
@ -238,6 +238,7 @@ void *_sbrk(int count)
|
||||||
{
|
{
|
||||||
void *ret, *ptr;
|
void *ret, *ptr;
|
||||||
|
|
||||||
|
/* coverity[CHECKED_RETURN] */
|
||||||
sys_sem_take(&heap_sem, K_FOREVER);
|
sys_sem_take(&heap_sem, K_FOREVER);
|
||||||
|
|
||||||
#if CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE
|
#if CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE
|
||||||
|
@ -253,6 +254,7 @@ void *_sbrk(int count)
|
||||||
ret = (void *)-1;
|
ret = (void *)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* coverity[CHECKED_RETURN] */
|
||||||
sys_sem_give(&heap_sem);
|
sys_sem_give(&heap_sem);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue