posix.cfg and gnu.cfg: Added support for more functions.

This commit is contained in:
orbitcowboy 2016-01-13 11:57:21 +01:00
parent 075c479bff
commit 023424f836
2 changed files with 80 additions and 12 deletions

View File

@ -405,6 +405,21 @@
<not-null/>
</arg>
</function>
<!-- int execvpe(const char *file, char *const argv[], char *const envp[]); -->
<function name="execvpe">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<!-- see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html -->
<define name="__builtin_expect(X,Y)" value="(X)"/>
<!-- see http://kernelnewbies.org/FAQ/LikelyUnlikely -->

View File

@ -175,18 +175,6 @@
<not-uninit/>
</arg>
</function>
<!-- int creat(const char *pathname, mode_t mode); -->
<function name="creat">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<!-- int open(const char *pathname, int flags, mode_t mode); -->
<function name="open">
<use-retval/>
@ -202,6 +190,18 @@
<not-uninit/>
</arg>
</function>
<!-- int creat(const char *pathname, mode_t mode); -->
<function name="creat">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<!-- unsigned int sleep(unsigned int seconds); -->
<function name="sleep">
<noreturn>false</noreturn>
@ -848,13 +848,31 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- FILE *fdopen(int fd, const char *mode); -->
<function name="fdopen">
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- long int random(void); -->
<function name="random">
<use-retval/>
<noreturn>false</noreturn>
</function>
<!-- void srandom(unsigned int seed); -->
<function name="srandom">
<noreturn>false</noreturn>
<!-- It is common practice to call srandom with an uninitialized
variable. Therefore, no warning shall be generated in this
very special case. -->
<arg nr="1"/>
</function>
<!-- struct dirent *readdir(DIR *dir); -->
<function name="readdir">
<noreturn>false</noreturn>
@ -2568,6 +2586,41 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- int execv(const char *path, char *const argv[]);
int execvp(const char *file, char *const argv[]); -->
<function name="execv,execvp">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<!-- pid_t wait(int *stat_loc); -->
<function name="wait">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
</arg>
</function>
<!-- pid_t waitpid(pid_t pid, int *stat_loc, int options); -->
<function name="waitpid">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-null/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<memory>
<alloc init="true">strdup</alloc>
<alloc init="true">strndup</alloc>