posix.cfg,gnu.cfg: Moved a few functions from posix to gnu. Improved the documentation.

This commit is contained in:
orbitcowboy 2016-01-21 16:32:00 +01:00
parent 1464990dad
commit b65873711a
2 changed files with 94 additions and 48 deletions

View File

@ -32,6 +32,7 @@
<not-uninit/>
</arg>
</function>
<!-- char *strndupa(const char *s, size_t n); -->
<function name="strndupa">
<use-retval/>
<noreturn>false</noreturn>
@ -43,6 +44,7 @@
<not-uninit/>
</arg>
</function>
<!-- char *strdupa(const char *s); -->
<function name="strdupa">
<use-retval/>
<noreturn>false</noreturn>
@ -420,6 +422,89 @@
<not-uninit/>
</arg>
</function>
<!-- int mkostemp(char *template, int flags);
int mkstemps(char *template, int suffixlen);-->
<function name="mkostemp,mkstemps">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<!-- int mkostemps(char *template, int suffixlen, int flags); -->
<function name="mkostemps">
<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 http://man7.org/linux/man-pages/man3/memmem.3.html-->
<!-- void *memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen);-->
<function name="memmem">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man3/memrchr.3.html -->
<!-- void *memrchr(const void *s, int c, size_t n); -->
<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>
<!-- http://man7.org/linux/man-pages/man3/rawmemchr.3.html -->
<!-- void *rawmemchr(const void *s, int c); -->
<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>
<!-- 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

@ -509,6 +509,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/>
</arg>
</function>
<!-- char *strndup(const char *s, size_t n); -->
<function name="strndup">
<noreturn>false</noreturn>
<arg nr="1">
@ -519,6 +520,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/>
</arg>
</function>
<!-- wchar_t *wcsdup(const wchar_t *s); -->
<function name="wcsdup">
<noreturn>false</noreturn>
<arg nr="1">
@ -526,6 +528,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/>
</arg>
</function>
<!-- int mkstemp(char *template); -->
<function name="mkstemp">
<noreturn>false</noreturn>
<leak-ignore/>
@ -534,6 +537,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/>
</arg>
</function>
<!-- char *mkdtemp(char *template); -->
<function name="mkdtemp">
<noreturn>false</noreturn>
<leak-ignore/>
@ -542,6 +546,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/>
</arg>
</function>
<!-- char *mktemp(char *template); -->
<function name="mktemp">
<noreturn>false</noreturn>
<leak-ignore/>
@ -757,6 +762,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- DIR *fdopendir(int fd); -->
<function name="fdopendir">
<noreturn>false</noreturn>
<arg nr="1">
@ -772,6 +778,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- FILE *popen(const char *command, const char *type); -->
<function name="popen">
<noreturn>false</noreturn>
<arg nr="1">
@ -783,6 +790,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- int pclose(FILE *stream); -->
<function name="pclose">
<noreturn>false</noreturn>
<arg nr="1">
@ -923,6 +931,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- int rand_r(unsigned int *seedp); -->
<function name="rand_r">
<noreturn>false</noreturn>
<leak-ignore/>
@ -931,54 +940,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<warn severity="style" reason="Obsolescent" alternatives="rand"/>
</function>
<function name="memmem">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</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>
<!-- int strcasecmp(const char *s1, const char *s2); -->
<function name="strcasecmp">
<pure/>