Improved testing of std.cfg and posix.cfg.
This commit is contained in:
parent
87e0f35a37
commit
66b9d8bf38
|
@ -828,6 +828,7 @@
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- ssize_t write(int fildes, const void *buf, size_t nbyte); -->
|
||||||
<function name="write">
|
<function name="write">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
|
@ -839,6 +840,7 @@
|
||||||
</arg>
|
</arg>
|
||||||
<arg nr="3">
|
<arg nr="3">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
|
<valid>0:</valid>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<function name="recv">
|
<function name="recv">
|
||||||
|
|
|
@ -148,12 +148,15 @@ void uninitvar(int fd)
|
||||||
char buf[2];
|
char buf[2];
|
||||||
int decimal, sign;
|
int decimal, sign;
|
||||||
double d;
|
double d;
|
||||||
|
void *p;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
write(x,"ab",2);
|
write(x,"ab",2);
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
write(fd,buf,2);
|
write(fd,buf,2);
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
write(fd,"ab",x);
|
write(fd,"ab",x);
|
||||||
|
// cppcheck-suppress uninitvar
|
||||||
|
write(fd,p,2);
|
||||||
|
|
||||||
|
|
||||||
/* int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); */
|
/* int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); */
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
void bufferAccessOutOfBounds(void)
|
void bufferAccessOutOfBounds(void)
|
||||||
{
|
{
|
||||||
|
@ -3367,3 +3368,13 @@ void uninitvar_itoa(void)
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)itoa(value,str,base);
|
(void)itoa(value,str,base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void invalidFunctionArgBool_abs(bool b, double x, double y)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress invalidFunctionArgBool
|
||||||
|
(void)abs(true); // #6990
|
||||||
|
// cppcheck-suppress invalidFunctionArgBool
|
||||||
|
(void)abs(b); // #6990
|
||||||
|
// cppcheck-suppress invalidFunctionArgBool
|
||||||
|
(void)abs(x<y); // #5635
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue