posix.cfg: Added more <not-bool/>-flags.

This commit is contained in:
orbitcowboy 2020-02-22 14:49:36 +01:00
parent e1eb7e04b5
commit 84d2c86d74
2 changed files with 81 additions and 0 deletions

View File

@ -52,6 +52,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -67,6 +68,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -82,6 +84,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -97,6 +100,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -112,6 +116,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -127,6 +132,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -142,6 +148,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -157,6 +164,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -172,6 +180,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -187,6 +196,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<valid>0:255</valid>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -201,6 +211,7 @@
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:255</valid>
</arg>
</function>
@ -451,6 +462,7 @@
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="inout">
@ -464,6 +476,7 @@
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -478,6 +491,7 @@
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="inout">
@ -560,6 +574,7 @@
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -573,6 +588,7 @@
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -587,6 +603,7 @@
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -679,6 +696,7 @@
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -736,6 +754,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<returnValue type="void"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man3/dirfd.3.html -->
@ -757,6 +776,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -891,6 +911,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<returnValue type="struct servent *"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -927,6 +948,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<returnValue type="struct netent *"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -983,6 +1005,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1166,6 +1189,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1185,6 +1209,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1202,6 +1227,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1223,6 +1249,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1296,6 +1323,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1318,6 +1346,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1326,6 +1355,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- int unlink(const char *pathname); -->
@ -1426,6 +1456,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="mode_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- int fchmod(int fildes, mode_t mode); -->
@ -1483,6 +1514,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -1525,6 +1557,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="3" direction="in">
@ -1540,6 +1573,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-null/>
@ -1635,9 +1669,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3">
<not-uninit/>
@ -1653,12 +1689,15 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="4" direction="in">
<not-null/>
@ -1678,12 +1717,15 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="4" direction="out">
<not-null/>
@ -1726,6 +1768,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="size_t"/>
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2">
<not-uninit/>
@ -1743,6 +1786,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="long int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -1781,6 +1825,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2">
@ -1825,6 +1870,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- int rand_r(unsigned int *seedp); -->
@ -1881,16 +1927,19 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4" direction="in">
<not-bool/>
<valid>1:</valid>
</arg>
</function>
@ -1900,6 +1949,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="out">
@ -1918,6 +1968,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -1935,6 +1986,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="out">
@ -1954,6 +2006,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="out">
@ -1961,9 +2014,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="5" direction="out"/>
<arg nr="6" direction="inout">
@ -2007,6 +2062,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -2014,6 +2070,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
@ -2028,6 +2085,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="ssize_t"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
@ -2050,16 +2108,20 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<valid>1:</valid>
</arg>
<arg nr="3" direction="in">
<not-bool/>
<not-uninit/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="5" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="6" direction="in">
@ -2078,16 +2140,20 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<valid>1:</valid>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="5" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="6" direction="in">
@ -2120,6 +2186,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -2132,10 +2199,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="any">
<not-uninit/>
@ -2149,10 +2218,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="any">
<not-uninit/>

View File

@ -22,6 +22,16 @@
#include <pthread.h>
#include <syslog.h>
#include <stdarg.h>
#include <ctype.h>
#include <stdbool.h>
bool invalidFunctionArgBool_isascii(bool b, int c)
{
// cppcheck-suppress invalidFunctionArgBool
(void)isascii(b);
// cppcheck-suppress invalidFunctionArgBool
return isascii(c != 0);
}
void uninitvar_putenv(char * envstr)
{