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/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- char *strndupa(const char *s, size_t n); -->
<function name="strndupa"> <function name="strndupa">
<use-retval/> <use-retval/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -43,6 +44,7 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- char *strdupa(const char *s); -->
<function name="strdupa"> <function name="strdupa">
<use-retval/> <use-retval/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -420,6 +422,89 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </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 --> <!-- see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html -->
<define name="__builtin_expect(X,Y)" value="(X)"/> <define name="__builtin_expect(X,Y)" value="(X)"/>
<!-- see http://kernelnewbies.org/FAQ/LikelyUnlikely --> <!-- 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/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- char *strndup(const char *s, size_t n); -->
<function name="strndup"> <function name="strndup">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -519,6 +520,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- wchar_t *wcsdup(const wchar_t *s); -->
<function name="wcsdup"> <function name="wcsdup">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -526,6 +528,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- int mkstemp(char *template); -->
<function name="mkstemp"> <function name="mkstemp">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
@ -534,6 +537,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- char *mkdtemp(char *template); -->
<function name="mkdtemp"> <function name="mkdtemp">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
@ -542,6 +546,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- char *mktemp(char *template); -->
<function name="mktemp"> <function name="mktemp">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
@ -757,6 +762,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- DIR *fdopendir(int fd); -->
<function name="fdopendir"> <function name="fdopendir">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -772,6 +778,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- FILE *popen(const char *command, const char *type); -->
<function name="popen"> <function name="popen">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -783,6 +790,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- int pclose(FILE *stream); -->
<function name="pclose"> <function name="pclose">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -923,6 +931,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- int rand_r(unsigned int *seedp); -->
<function name="rand_r"> <function name="rand_r">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
@ -931,54 +940,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg> </arg>
<warn severity="style" reason="Obsolescent" alternatives="rand"/> <warn severity="style" reason="Obsolescent" alternatives="rand"/>
</function> </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); --> <!-- int strcasecmp(const char *s1, const char *s2); -->
<function name="strcasecmp"> <function name="strcasecmp">
<pure/> <pure/>