From 84d2c86d74defcae5c272e301ce58f83b6a3a3e4 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Sat, 22 Feb 2020 14:49:36 +0100 Subject: [PATCH] posix.cfg: Added more -flags. --- cfg/posix.cfg | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ test/cfg/posix.c | 10 +++++++ 2 files changed, 81 insertions(+) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index b7d956996..813b2910e 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -52,6 +52,7 @@ 0:255 + @@ -67,6 +68,7 @@ 0:255 + @@ -82,6 +84,7 @@ 0:255 + @@ -97,6 +100,7 @@ 0:255 + @@ -112,6 +116,7 @@ 0:255 + @@ -127,6 +132,7 @@ 0:255 + @@ -142,6 +148,7 @@ 0:255 + @@ -157,6 +164,7 @@ 0:255 + @@ -172,6 +180,7 @@ 0:255 + @@ -187,6 +196,7 @@ 0:255 + @@ -201,6 +211,7 @@ + 0:255 @@ -451,6 +462,7 @@ + 0: @@ -464,6 +476,7 @@ + 0: @@ -478,6 +491,7 @@ + 0: @@ -560,6 +574,7 @@ + @@ -573,6 +588,7 @@ + 0: @@ -587,6 +603,7 @@ + 0: @@ -679,6 +696,7 @@ false + @@ -736,6 +754,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -757,6 +776,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -891,6 +911,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -927,6 +948,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -983,6 +1005,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1166,6 +1189,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1185,6 +1209,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1202,6 +1227,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1223,6 +1249,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1296,6 +1323,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1318,6 +1346,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1326,6 +1355,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1426,6 +1456,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1483,6 +1514,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1525,6 +1557,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1540,6 +1573,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1635,9 +1669,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -1653,12 +1689,15 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + + @@ -1678,12 +1717,15 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + + @@ -1726,6 +1768,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1743,6 +1786,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1781,6 +1825,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s false + 0: @@ -1825,6 +1870,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1881,16 +1927,19 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: + 0: + 1: @@ -1900,6 +1949,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1918,6 +1968,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1935,6 +1986,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1954,6 +2006,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -1961,9 +2014,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -2007,6 +2062,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -2014,6 +2070,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2028,6 +2085,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: @@ -2050,16 +2108,20 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 1: + + + 0: @@ -2078,16 +2140,20 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 1: + + + 0: @@ -2120,6 +2186,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2132,10 +2199,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: + @@ -2149,10 +2218,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: + diff --git a/test/cfg/posix.c b/test/cfg/posix.c index a540f5a42..b973c8af9 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -22,6 +22,16 @@ #include #include #include +#include +#include + +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) {