From 0eae0023a38df1da4a212a1d3b26cd01b1085c4d Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Thu, 2 Jun 2022 09:41:10 +0200 Subject: [PATCH] posix.cfg: Added missing ''-flags --- cfg/posix.cfg | 99 +++++++++++++++++++++++++++++++++++++++++++++++- test/cfg/posix.c | 4 +- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index 39bfad693..2ab8b32dc 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -416,6 +416,7 @@ + @@ -518,6 +519,7 @@ + @@ -536,6 +538,7 @@ + @@ -673,6 +676,7 @@ + @@ -704,6 +708,7 @@ + @@ -784,6 +789,7 @@ + 0: @@ -793,6 +799,7 @@ + @@ -803,11 +810,13 @@ + + @@ -820,6 +829,7 @@ + @@ -844,6 +854,7 @@ + @@ -862,6 +873,7 @@ + @@ -924,6 +936,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -942,6 +955,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1007,6 +1021,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + Non reentrant function 'getprotobyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotobyname_r'. @@ -1039,10 +1054,12 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + + Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'. @@ -1059,6 +1076,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + Non reentrant function 'getservbyport' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyport_r'. @@ -1080,6 +1098,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + Non reentrant function 'getnetbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetbyname_r'. @@ -1117,6 +1136,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1129,6 +1149,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1207,6 +1228,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1217,6 +1239,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func + @@ -1292,6 +1315,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1306,6 +1330,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1326,6 +1351,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1346,6 +1372,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1364,6 +1391,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1386,6 +1414,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1409,6 +1438,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1420,6 +1450,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1431,6 +1462,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1441,11 +1473,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -1462,6 +1496,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1471,6 +1506,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1487,6 +1523,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1502,6 +1539,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1512,6 +1550,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1526,6 +1565,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1558,6 +1598,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1576,6 +1617,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1614,6 +1656,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1631,6 +1674,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1676,6 +1720,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1711,6 +1756,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1730,6 +1776,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1747,6 +1794,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1780,11 +1828,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -1936,6 +1986,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -1966,6 +2017,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2028,11 +2080,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -2046,10 +2100,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -2467,6 +2523,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2524,6 +2581,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2541,6 +2599,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -2967,6 +3026,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3024,6 +3084,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3044,6 +3105,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3130,6 +3192,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3176,9 +3239,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s false + + @@ -3329,6 +3394,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. @@ -3352,6 +3418,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3367,6 +3434,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3458,6 +3526,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3468,6 +3537,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3560,6 +3630,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3585,6 +3656,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3621,6 +3693,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3888,6 +3961,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3898,6 +3972,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3933,10 +4008,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + + @@ -3950,6 +4027,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4017,6 +4095,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4041,6 +4120,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4050,6 +4130,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4066,6 +4147,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4394,6 +4476,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4410,6 +4493,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4752,6 +4836,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + Non reentrant function 'getspnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getspnam_r'. @@ -4786,6 +4871,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + Non reentrant function 'sgetspent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'sgetspent_r'. @@ -4869,6 +4955,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. @@ -4895,6 +4982,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5022,6 +5110,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5070,6 +5159,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5182,6 +5272,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5318,6 +5409,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5377,6 +5469,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5431,6 +5524,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -5667,7 +5761,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s false - + + + + diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 482214d12..ddb7788da 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -537,8 +537,10 @@ void bufferAccessOutOfBounds_bzero(void *s, size_t n) size_t bufferAccessOutOfBounds_strnlen(const char *s, size_t maxlen) { - char buf[2]={'4','2'}; + const char buf[2]={'4','2'}; + // cppcheck-suppress invalidFunctionArgStr size_t len = strnlen(buf,2); + // cppcheck-suppress invalidFunctionArgStr // cppcheck-suppress bufferAccessOutOfBounds len+=strnlen(buf,3); return len;