posix.cfg: Fix false positives and add poll()

This commit is contained in:
Alexander Mai 2015-03-14 23:31:56 +01:00
parent 40769c9a59
commit 5b8d93efda
2 changed files with 17 additions and 6 deletions

View File

@ -837,7 +837,7 @@
<!-- pid_t setsid(void); -->
<function name="setsid">
<noreturn>false</noreturn>
<use-retval/>
<!-- it is a good idea to do: <use-retval/> -->
</function>
<!-- char *getwd(char *path_name);-->
<function name="getwd">
@ -1047,6 +1047,21 @@
<function name="setpwent">
<noreturn>false</noreturn>
</function>
<!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html -->
<!-- int poll(struct pollfd [], nfds_t, int); -->
<function name="poll">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html -->
<podtype name="regex_t"/>
<!-- int regcomp(regex_t *, const char *, int); -->
@ -1066,16 +1081,11 @@
<function name="regerror">
<noreturn>false</noreturn>
<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>

View File

@ -150,6 +150,7 @@ void uninitvar(int fd) {
pattern="";
// cppcheck-suppress uninitvar
regcomp(&reg, pattern, cflags);
regerror (0, &reg, 0, 0);
// cppcheck-suppress uninitvar
// cppcheck-suppress unreadVariable
char *buffer = ecvt(d, 11, &decimal, &sign);