cppcheck/cfg/posix.cfg

654 lines
14 KiB
INI

<?xml version="1.0"?>
<def format="1">
<function name="usleep">
<noreturn>false</noreturn>
<arg nr="1">
<not-bool/>
<valid>0:999999</valid>
</arg>
<leak-ignore/>
</function>
<!-- void _exit(int status); -->
<function name="_exit">
<noreturn>true</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- int access(const char *pathname, int mode); -->
<function name="access">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- unsigned int alarm(unsigned int seconds); -->
<function name="alarm">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int brk(void *addr); -->
<function name="brk">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- void *sbrk(intptr_t incr);-->
<function name="sbrk">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int closedir(DIR *dir); -->
<function name="closedir">
<noreturn>false</noreturn>
<arg nr="1">
<not-bool/>
<not-uninit/>
<not-null/>
</arg>
</function>
<function name="strdup">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
</function>
<function name="strdupa">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
</function>
<function name="strndup">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<function name="strndupa">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<function name="wcsdup">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
</function>
<function name="mkstemp">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<function name="mkdtemp">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<function name="mktemp">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- char *getcwd(char *buf, size_t size); -->
<function name="getcwd">
<noreturn>false</noreturn>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int mkdir(const char *pathname, mode_t mode); -->
<function name="mkdir">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int rmdir(const char *pathname); -->
<function name="rmdir">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int chdir(const char *path); -->
<function name="chdir">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int chroot(const char *path); -->
<function name="chroot">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int link(const char *oldpath, const char *newpath); -->
<function name="link">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int unlink(const char *pathname); -->
<function name="unlink">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int rename(const char *oldpath, const char *newpath); -->
<function name="rename">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int stat(const char *file_name, struct stat *buf); -->
<function name="stat">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- int chmod(const char *path, mode_t mode); -->
<function name="chmod">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int chown(const char *path, uid_t owner, gid_t group); -->
<function name="chown">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int utime(const char *filename, struct utimbuf *buf); -->
<function name="utime">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-null/>
</arg>
<leak-ignore/>
</function>
<!-- DIR *opendir(const char *name); -->
<function name="opendir">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
</function>
<function name="isatty">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<function name="popen">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-null/>
<not-uninit/>
</arg>
</function>
<function name="pclose">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- int close(int fildes); -->
<function name="close">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- size_t confstr(int, char *, size_t); -->
<function name="confstr">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- long int sysconf(int name); -->
<function name="sysconf">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<function name="fdopen">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- struct dirent *readdir(DIR *dir); -->
<function name="readdir">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- void rewinddir(DIR *dir); -->
<function name="rewinddir">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<function name="rand_r">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
</arg>
</function>
<function name="memmem">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
<not-null/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
</function>
<function name="memrchr">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="3">
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<function name="rawmemchr">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<function name="strcasecmp">
<noreturn>false</noreturn>
<pure/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
<not-null/>
</arg>
</function>
<function name="strncasecmp">
<noreturn>false</noreturn>
<pure/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
<not-null/>
</arg>
<arg nr="3">
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<!-- ssize_t read(int fd, void *buf, size_t count); -->
<function name="read">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<function name="write">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<function name="recv">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
</function>
<function name="recvfrom">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5"/>
<arg nr="6"/>
</function>
<function name="send">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
</function>
<function name="sendto">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5"/>
<arg nr="6"/>
</function>
<!-- void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); -->
<function name="mmap">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5">
<not-uninit/>
</arg>
<arg nr="6">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- void *mmap64(void *addr, size_t length, int prot, int flags, int fd, off64_t offset); -->
<function name="mmap64">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5">
<not-uninit/>
</arg>
<arg nr="6">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int munmap(void *addr, size_t length); -->
<function name="munmap">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<memory>
<dealloc>free</dealloc>
<alloc init="true">strdup</alloc>
<alloc init="true">strndup</alloc>
<alloc init="true">wcsdup</alloc>
</memory>
<memory>
<dealloc>munmap</dealloc>
<alloc init="true">mmap</alloc>
<alloc init="true">mmap64</alloc>
</memory>
<resource>
<dealloc>close</dealloc>
<alloc init="true">open</alloc>
<alloc init="true">socket</alloc>
</resource>
<resource>
<dealloc>closedir</dealloc>
<alloc init="true">opendir</alloc>
<alloc init="true">fdopendir</alloc>
</resource>
<resource>
<dealloc>fclose</dealloc>
<alloc init="true">fdopen</alloc>
</resource>
<resource>
<dealloc>pclose</dealloc>
<alloc init="true">popen</alloc>
</resource>
<!-- This type definitions refer to http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html-->
<podtype name="in_port_t" sign="u" size="2"/>
<podtype name="in_addr_t" sign="u" size="4"/>
<podtype name="socklen_t" sign="u" size="4"/>
<podtype name="sa_family_t" sign="u" size="2"/>
<podtype name="nlink_t" sign="s"/>
<podtype name="mode_t" sign="s"/>
<podtype name="pid_t" sign="s"/>
<podtype name="uid_t" sign="s"/>
<podtype name="gid_t" sign="s"/>
<podtype name="id_t" sign="s"/>
<podtype name="blkcnt_t" sign="s"/>
<podtype name="off_t" sign="s"/>
<podtype name="fsblkcnt_t" sign="u"/>
<podtype name="fsfilcnt_t" sign="u"/>
<podtype name="ino_t" sign="u"/>
<podtype name="useconds_t" sign="u"/>
<podtype name="suseconds_t" sign="u"/>
<podtype name="blksize_t" sign="s"/>
<podtype name="ssize_t" sign="s"/>
<podtype name="dirent"/>
<podtype name="DIR"/>
<podtype name="clockid_t"/>
<podtype name="dev_t"/>
<podtype name="key_t"/>
<podtype name="tms"/>
<podtype name="pthread_attr_t"/>
<podtype name="pthread_cond_t"/>
<podtype name="pthread_condattr_t"/>
<podtype name="pthread_key_t"/>
<podtype name="pthread_mutexattr_t"/>
<podtype name="pthread_mutex_t"/>
<podtype name="pthread_barrier_t"/>
<podtype name="pthread_barrierattr_t"/>
<podtype name="pthread_once_t"/>
<podtype name="pthread_rwlock_t"/>
<podtype name="pthread_rwlockattr_t"/>
<podtype name="pthread_spinlock_t"/>
<podtype name="pthread_t"/>
<podtype name="timer_t"/>
<podtype name="trace_attr_t"/>
<podtype name="trace_event_id_t"/>
<podtype name="trace_event_set_t"/>
<podtype name="trace_id_t"/>
<podtype name="stat"/>
<podtype name="jmp_buf"/>
<podtype name="sigjmp_buf"/>
<podtype name="sigset_t"/>
<podtype name="termios"/>
<podtype name="intptr_t"/>
</def>