posix.cfg: Added support for aio_read()

This commit is contained in:
orbitcowboy 2022-04-20 07:27:28 +02:00
parent e0942c1bb4
commit 5a3d84d84d
2 changed files with 20 additions and 0 deletions

View File

@ -14,6 +14,18 @@
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- https://man7.org/linux/man-pages/man3/aio_read.3.html -->
<!-- int aio_read(struct aiocb *aiocbp); -->
<function name="aio_read">
<use-retval/>
<returnValue type="int"/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="inout">
<not-null/>
<not-bool/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/aio_suspend.3.html --> <!-- https://man7.org/linux/man-pages/man3/aio_suspend.3.html -->
<!-- int aio_suspend(const struct aiocb *const aiocb_list[], int nitems, const struct timespec *restrict timeout); --> <!-- int aio_suspend(const struct aiocb *const aiocb_list[], int nitems, const struct timespec *restrict timeout); -->
<function name="aio_suspend"> <function name="aio_suspend">

View File

@ -30,6 +30,14 @@
#include <wchar.h> #include <wchar.h>
#include <string.h> #include <string.h>
int nullPointer_aio_read(struct aiocb *aiocbp)
{
// cppcheck-suppress nullPointer
(void)aio_read(NULL);
// No warning is expected
return aio_read(aiocbp);
}
int nullPointer_aio_suspend(const struct aiocb *const aiocb_list[], int nitems, const struct timespec *restrict timeout) int nullPointer_aio_suspend(const struct aiocb *const aiocb_list[], int nitems, const struct timespec *restrict timeout)
{ {
// cppcheck-suppress nullPointer // cppcheck-suppress nullPointer