posix.cfg: Further fixes/enhancements; adding more argument directions

This commit is contained in:
versat 2019-03-11 15:40:53 +01:00
parent 0721c9f7f0
commit f21c3b13f1
1 changed files with 85 additions and 65 deletions

View File

@ -2025,7 +2025,8 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- int dbm_clearerr(DBM *); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html -->
<!-- int dbm_clearerr(DBM *db); -->
<function name="dbm_clearerr"> <function name="dbm_clearerr">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -2035,7 +2036,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- void dbm_close(DBM *); --> <!-- void dbm_close(DBM *db); -->
<function name="dbm_close"> <function name="dbm_close">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
@ -2043,7 +2044,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- int dbm_delete(DBM *, datum); --> <!-- int dbm_delete(DBM *db, datum key); -->
<function name="dbm_delete"> <function name="dbm_delete">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -2051,11 +2052,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- int dbm_error(DBM *); --> <!-- int dbm_error(DBM *db); -->
<function name="dbm_error"> <function name="dbm_error">
<use-retval/> <use-retval/>
<returnValue type="int"/> <returnValue type="int"/>
@ -2066,7 +2067,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- datum dbm_fetch(DBM *, datum); --> <!-- datum dbm_fetch(DBM *db, datum key); -->
<function name="dbm_fetch"> <function name="dbm_fetch">
<use-retval/> <use-retval/>
<returnValue type="datum"/> <returnValue type="datum"/>
@ -2075,11 +2076,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- datum dbm_firstkey(DBM *); --> <!-- datum dbm_firstkey(DBM *db); -->
<function name="dbm_firstkey"> <function name="dbm_firstkey">
<use-retval/> <use-retval/>
<returnValue type="datum"/> <returnValue type="datum"/>
@ -2090,7 +2091,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- datum dbm_nextkey(DBM *); --> <!-- datum dbm_nextkey(DBM *db); -->
<function name="dbm_nextkey"> <function name="dbm_nextkey">
<use-retval/> <use-retval/>
<returnValue type="datum"/> <returnValue type="datum"/>
@ -2101,23 +2102,23 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- DBM *dbm_open(const char *, int, mode_t); --> <!-- DBM *dbm_open(const char *file, int open_flags, mode_t file_mode); -->
<function name="dbm_open"> <function name="dbm_open">
<returnValue type="DBM *"/> <returnValue type="DBM *"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- int dbm_store(DBM *, datum, datum, int); --> <!-- int dbm_store(DBM *db, datum key, datum content, int store_mode); -->
<function name="dbm_store"> <function name="dbm_store">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -2125,13 +2126,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="4" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
@ -2151,28 +2152,29 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<function name="getaddrinfo"> <function name="getaddrinfo">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="4" direction="out">
<not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- void endhostent(void); --> <!-- void endhostent(void); -->
<function name="endhostent"> <function name="endhostent">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="void"/>
</function> </function>
<!-- void sethostent(int stayopen); --> <!-- void sethostent(int stayopen); -->
<function name="sethostent"> <function name="sethostent">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <returnValue type="void"/>
<arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
@ -2202,7 +2204,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<use-retval/> <use-retval/>
<returnValue type="struct passwd *"/> <returnValue type="struct passwd *"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
@ -2214,6 +2216,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
threadsafe function exists that should be used. --> threadsafe function exists that should be used. -->
<warn severity="portability">Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.</warn> <warn severity="portability">Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.</warn>
</function> </function>
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html -->
<!-- char *strtok_r(char *str, const char *delim, char **saveptr); --> <!-- char *strtok_r(char *str, const char *delim, char **saveptr); -->
<function name="strtok_r"> <function name="strtok_r">
<!-- strtok may modify the first argument, so using the return value is not mandatory --> <!-- strtok may modify the first argument, so using the return value is not mandatory -->
@ -2221,31 +2224,36 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="char *"/> <returnValue type="char *"/>
<pure/> <pure/>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1" direction="inout">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="inout">
<not-null/> <not-null/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!--int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwnam.html -->
<!-- int getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result); -->
<function name="getpwnam_r"> <function name="getpwnam_r">
<use-retval/> <use-retval/>
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="2" direction="out"/>
<arg nr="3" direction="out">
<minsize type="argvalue" arg="4"/>
</arg>
<arg nr="4" direction="in">
<not-uninit/> <not-uninit/>
<valid>0:</valid> <valid>0:</valid>
</arg> </arg>
<arg nr="5"> <arg nr="5" direction="out">
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
@ -2254,32 +2262,39 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<use-retval/> <use-retval/>
<returnValue type="struct passwd *"/> <returnValue type="struct passwd *"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
<warn severity="portability">Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'.</warn> <warn severity="portability">Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'.</warn>
</function> </function>
<!-- int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwuid.html -->
<!-- int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result); -->
<function name="getpwuid_r"> <function name="getpwuid_r">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="2" direction="out"/>
<arg nr="3" direction="out">
<minsize type="argvalue" arg="4"/>
</arg>
<arg nr="4" direction="in">
<not-uninit/> <not-uninit/>
<valid>0:</valid> <valid>0:</valid>
</arg> </arg>
<arg nr="5"> <arg nr="5" direction="out">
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- void setpwent(void); --> <!-- void setpwent(void); -->
<function name="setpwent"> <function name="setpwent">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="void"/>
</function> </function>
<!-- int catclose(nl_catd); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/catclose.html -->
<!-- int catclose(nl_catd catd); -->
<function name="catclose"> <function name="catclose">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -2288,7 +2303,8 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- char *catgets(nl_catd, int, int, const char *); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/catgets.html -->
<!-- char *catgets(nl_catd catd, int set_id, int msg_id, const char *s); -->
<function name="catgets"> <function name="catgets">
<returnValue type="char *"/> <returnValue type="char *"/>
<use-retval/> <use-retval/>
@ -2296,102 +2312,106 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1"> <arg nr="1">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="4" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- nl_catd catopen(const char *, int); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/catopen.html -->
<!-- nl_catd catopen(const char *name, int oflag); -->
<function name="catopen"> <function name="catopen">
<returnValue type="nl_catd"/> <returnValue type="nl_catd"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html --> <!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html -->
<!-- int poll(struct pollfd [], nfds_t, int); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html -->
<!-- int poll(struct pollfd fds[], nfds_t nfds, int timeout); -->
<function name="poll"> <function name="poll">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="inout">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- int regcomp(regex_t *, const char *, int); --> <!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.html -->
<!-- int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); -->
<function name="regcomp"> <function name="regcomp">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="out">
<not-null/> <not-null/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- size_t regerror(int, const regex_t *, char *, size_t); --> <!-- size_t regerror(int errcode, const regex_t *restrict preg, char *restrict errbuf, size_t errbuf_size); -->
<function name="regerror"> <function name="regerror">
<returnValue type="size_t"/> <returnValue type="size_t"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="4"> <arg nr="3" direction="out">
<minsize type="argvalue" arg="4"/>
</arg>
<arg nr="4" direction="in">
<not-uninit/> <not-uninit/>
<valid>0:</valid> <valid>0:</valid>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- int regexec(const regex_t *, const char *, size_t, regmatch_t [restrict], int); --> <!-- int regexec(const regex_t *restrict preg, const char *restrict string, size_t nmatch, regmatch_t pmatch[restrict], int eflags); -->
<function name="regexec"> <function name="regexec">
<returnValue type="int"/> <returnValue type="int"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1" direction="in">
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="2"> <arg nr="2" direction="in">
<not-null/> <not-null/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="3"> <arg nr="3" direction="in">
<not-uninit/> <not-uninit/>
<valid>0:</valid> <valid>0:</valid>
</arg> </arg>
<arg nr="4"> <arg nr="4" direction="out"/>
<not-uninit/> <arg nr="5" direction="in">
</arg>
<arg nr="5">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>
</function> </function>
<!-- void regfree(regex_t *); --> <!-- void regfree(regex_t *preg); -->
<function name="regfree"> <function name="regfree">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">