posix.cfg: add support for sched.h and 1 bugfix
This commit is contained in:
parent
3c891f7960
commit
6d9eb6199d
|
@ -739,6 +739,7 @@
|
|||
<podtype name="sigset_t"/>
|
||||
<podtype name="termios"/>
|
||||
<podtype name="intptr_t"/>
|
||||
<podtype name="timespec"/>
|
||||
<!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/pwd.h.html -->
|
||||
<podtype name="passwd"/>
|
||||
<!--void endpwent(void); -->
|
||||
|
@ -789,7 +790,6 @@
|
|||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
|
@ -845,4 +845,74 @@
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html -->
|
||||
<podtype name="sched_param"/>
|
||||
<!-- int sched_get_priority_max(int); -->
|
||||
<function name="sched_get_priority_max">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_get_priority_min(int); -->
|
||||
<function name="sched_get_priority_min">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_getparam(pid_t, struct sched_param *); -->
|
||||
<function name="sched_getparam">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_getscheduler(pid_t); -->
|
||||
<function name="sched_getscheduler">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_rr_get_interval(pid_t, struct timespec *); -->
|
||||
<function name="sched_rr_get_interval">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_setparam(pid_t, const struct sched_param *); -->
|
||||
<function name="sched_setparam">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_setscheduler(pid_t, int, const struct sched_param *); -->
|
||||
<function name="sched_setscheduler">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="3">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sched_yield(void); -->
|
||||
<function name="sched_yield">
|
||||
<noreturn>false</noreturn>
|
||||
</function>
|
||||
</def>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <sys/socket.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
void bufferAccessOutOfBounds(int fd) {
|
||||
char a[5];
|
||||
|
@ -124,6 +124,20 @@ void uninitvar(int fd) {
|
|||
write(fd,buf,2);
|
||||
// cppcheck-suppress uninitvar
|
||||
write(fd,"ab",x);
|
||||
|
||||
|
||||
/* int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); */
|
||||
regex_t reg;
|
||||
const char * pattern;
|
||||
int cflags;
|
||||
// cppcheck-suppress uninitvar
|
||||
regcomp(®, pattern, cflags);
|
||||
pattern="";
|
||||
// cppcheck-suppress uninitvar
|
||||
regcomp(®, pattern, cflags);
|
||||
cflags=42;
|
||||
// cppcheck-suppress uninitvar
|
||||
regcomp(®, pattern, cflags);
|
||||
}
|
||||
|
||||
void uninitvar_types(void) {
|
||||
|
|
Loading…
Reference in New Issue