posix.cfg: Added support for semop().
This commit is contained in:
parent
3e686103ae
commit
63e58b9051
|
@ -14,6 +14,28 @@
|
|||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int semop(int semid, struct sembuf *sops, size_t nsops); -->
|
||||
<function name="semop">
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="int"/>
|
||||
<use-retval/>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<arg nr="2" direction="out">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- https://man7.org/linux/man-pages/man3/wcsnrtombs.3.html -->
|
||||
<!-- size_t wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps); -->
|
||||
<function name="wcsnrtombs">
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <dirent.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <dlfcn.h>
|
||||
|
@ -31,6 +32,13 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
int nullPointer_semop(int semid, struct sembuf *sops, size_t nsops)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)semop(semid, NULL, nsops);
|
||||
return semop(semid, sops, nsops);
|
||||
}
|
||||
|
||||
int nullPointer_socketpair(int domain, int t, int protocol, int sv[2])
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
|
|
Loading…
Reference in New Issue