generate_cfg_tests: updating testing for not-null

This commit is contained in:
Daniel Marjamäki 2018-03-18 13:53:46 +01:00
parent 914eea7ed1
commit c800ac5118
12 changed files with 2391 additions and 1196 deletions

View File

@ -35,8 +35,9 @@ void test__vfprintf_P__leakignore() {
}
void test__vfprintf_P__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
vfprintf_P(NULL, arg2);
vfprintf_P(p, arg2);
}
void test__vfprintf_P__arg1__notuninit() {
@ -124,8 +125,9 @@ void test__fprintf_P__leakignore() {
}
void test__fprintf_P__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fprintf_P(NULL, arg2);
fprintf_P(p, arg2);
}
void test__fprintf_P__arg1__notuninit() {
@ -148,8 +150,9 @@ void test__fputs_P__leakignore() {
}
void test__fputs_P__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fputs_P(NULL, arg2);
fputs_P(p, arg2);
}
void test__fputs_P__arg1__notuninit() {
@ -159,8 +162,9 @@ void test__fputs_P__arg1__notuninit() {
}
void test__fputs_P__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fputs_P(arg1, NULL);
fputs_P(arg1, p);
}
void test__fputs_P__arg2__notuninit() {
@ -188,8 +192,9 @@ void test__puts_P__arg1__notbool() {
}
void test__puts_P__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
puts_P(NULL);
puts_P(p);
}
void test__puts_P__arg1__notuninit() {
@ -257,8 +262,9 @@ void test__fdevopen__noreturn() {
}
void test__fdevopen__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fdevopen(NULL, arg2);
fdevopen(p, arg2);
}
void test__fdevopen__arg1__notuninit() {
@ -268,8 +274,9 @@ void test__fdevopen__arg1__notuninit() {
}
void test__fdevopen__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fdevopen(arg1, NULL);
fdevopen(arg1, p);
}
void test__fdevopen__arg2__notuninit() {
@ -298,8 +305,9 @@ void test__ltoa__arg1__notuninit() {
}
void test__ltoa__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ltoa(arg1, NULL, arg3);
ltoa(arg1, p, arg3);
}
void test__ltoa__arg2__notuninit() {
@ -309,8 +317,9 @@ void test__ltoa__arg2__notuninit() {
}
void test__ltoa__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ltoa(arg1, arg2, NULL);
ltoa(arg1, arg2, p);
}
void test__ltoa__arg3__notuninit() {
@ -339,8 +348,9 @@ void test__utoa__arg1__notuninit() {
}
void test__utoa__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
utoa(arg1, NULL, arg3);
utoa(arg1, p, arg3);
}
void test__utoa__arg2__notuninit() {
@ -350,8 +360,9 @@ void test__utoa__arg2__notuninit() {
}
void test__utoa__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
utoa(arg1, arg2, NULL);
utoa(arg1, arg2, p);
}
void test__utoa__arg3__notuninit() {
@ -380,8 +391,9 @@ void test__ultoa__arg1__notuninit() {
}
void test__ultoa__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ultoa(arg1, NULL, arg3);
ultoa(arg1, p, arg3);
}
void test__ultoa__arg2__notuninit() {
@ -391,8 +403,9 @@ void test__ultoa__arg2__notuninit() {
}
void test__ultoa__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ultoa(arg1, arg2, NULL);
ultoa(arg1, arg2, p);
}
void test__ultoa__arg3__notuninit() {
@ -428,8 +441,9 @@ void test__random_r__leakignore() {
}
void test__random_r__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
random_r(NULL);
random_r(p);
}
void test__srandom__noreturn() {
@ -471,8 +485,9 @@ void test__dtostre__arg1__notuninit() {
}
void test__dtostre__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
dtostre(arg1, NULL);
dtostre(arg1, p);
}
void test__dtostrf__noreturn() {
@ -507,8 +522,9 @@ void test__dtostrf__arg3__notuninit() {
}
void test__dtostrf__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
dtostrf(arg1, arg2, arg3, NULL);
dtostrf(arg1, arg2, arg3, p);
}
void test__ffs__noreturn() {
@ -582,8 +598,9 @@ void test__memccpy__leakignore() {
}
void test__memccpy__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
memccpy(NULL, arg2, arg3, arg4);
memccpy(p, arg2, arg3, arg4);
}
void test__memccpy__arg2__notuninit() {

View File

@ -28,8 +28,9 @@ void test__fts_open__arg2__notuninit() {
}
void test__fts_open__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fts_open(arg1, arg2, NULL);
fts_open(arg1, arg2, p);
}
void test__fts_open__arg3__notuninit() {
@ -46,8 +47,9 @@ void test__fts_read__noreturn() {
}
void test__fts_read__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fts_read(NULL);
fts_read(p);
}
void test__fts_read__arg1__notuninit() {
@ -178,13 +180,15 @@ void test__readpassphrase__arg1__notuninit() {
}
void test__readpassphrase__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
readpassphrase(arg1, NULL, arg3, arg4);
readpassphrase(arg1, p, arg3, arg4);
}
void test__readpassphrase__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
readpassphrase(arg1, arg2, NULL, arg4);
readpassphrase(arg1, arg2, p, arg4);
}
void test__readpassphrase__arg3__notuninit() {
@ -226,8 +230,9 @@ void test__strtonum__leakignore() {
}
void test__strtonum__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
strtonum(NULL, arg2, arg3, arg4);
strtonum(p, arg2, arg3, arg4);
}
void test__strtonum__arg1__notuninit() {

View File

@ -34,8 +34,9 @@ void test__accept__arg2__notuninit() {
}
void test__accept__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
accept(arg1, arg2, NULL, arg4);
accept(arg1, arg2, p, arg4);
}
void test__accept__arg3__notuninit() {
@ -63,8 +64,9 @@ void test__atoq__useretval() {
}
void test__atoq__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = atoq(NULL);
result = atoq(p);
}
void test__atoq__arg1__notuninit() {
@ -86,8 +88,9 @@ void test__strndupa__useretval() {
}
void test__strndupa__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strndupa(NULL, arg2);
result = strndupa(p, arg2);
}
void test__strndupa__arg1__notuninit() {
@ -121,8 +124,9 @@ void test__strsep__arg1__notuninit() {
}
void test__strsep__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strsep(arg1, NULL);
result = strsep(arg1, p);
}
void test__strsep__arg2__notuninit() {
@ -144,8 +148,9 @@ void test__strdupa__useretval() {
}
void test__strdupa__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strdupa(NULL);
result = strdupa(p);
}
void test__strdupa__arg1__notuninit() {
@ -162,8 +167,9 @@ void test__backtrace__noreturn() {
}
void test__backtrace__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
backtrace(NULL, arg2);
backtrace(p, arg2);
}
void test__backtrace__arg2__notuninit() {
@ -185,8 +191,9 @@ void test__backtrace_symbols__useretval() {
}
void test__backtrace_symbols__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = backtrace_symbols(NULL, arg2);
result = backtrace_symbols(p, arg2);
}
void test__backtrace_symbols__arg1__notuninit() {
@ -209,8 +216,9 @@ void test__backtrace_symbols_fd__noreturn() {
}
void test__backtrace_symbols_fd__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
backtrace_symbols_fd(NULL, arg2, arg3);
backtrace_symbols_fd(p, arg2, arg3);
}
void test__backtrace_symbols_fd__arg1__notuninit() {
@ -251,13 +259,15 @@ void test__ecvt__arg2__notuninit() {
}
void test__ecvt__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ecvt(arg1, arg2, NULL, arg4);
ecvt(arg1, arg2, p, arg4);
}
void test__ecvt__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ecvt(arg1, arg2, arg3, NULL);
ecvt(arg1, arg2, arg3, p);
}
void test__qfcvt__noreturn() {
@ -280,13 +290,15 @@ void test__qfcvt__arg2__notuninit() {
}
void test__qfcvt__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qfcvt(arg1, arg2, NULL, arg4);
qfcvt(arg1, arg2, p, arg4);
}
void test__qfcvt__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qfcvt(arg1, arg2, arg3, NULL);
qfcvt(arg1, arg2, arg3, p);
}
void test__qgcvt__noreturn() {
@ -309,8 +321,9 @@ void test__qgcvt__arg2__notuninit() {
}
void test__qgcvt__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qgcvt(arg1, arg2, NULL);
qgcvt(arg1, arg2, p);
}
void test__ecvt_r__noreturn() {
@ -338,18 +351,21 @@ void test__ecvt_r__arg2__notuninit() {
}
void test__ecvt_r__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ecvt_r(arg1, arg2, NULL, arg4, arg5, arg6);
ecvt_r(arg1, arg2, p, arg4, arg5, arg6);
}
void test__ecvt_r__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ecvt_r(arg1, arg2, arg3, NULL, arg5, arg6);
ecvt_r(arg1, arg2, arg3, p, arg5, arg6);
}
void test__ecvt_r__arg5__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
ecvt_r(arg1, arg2, arg3, arg4, NULL, arg6);
ecvt_r(arg1, arg2, arg3, arg4, p, arg6);
}
void test__ecvt_r__arg6__notuninit() {
@ -383,18 +399,21 @@ void test__fcvt_r__arg2__notuninit() {
}
void test__fcvt_r__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fcvt_r(arg1, arg2, NULL, arg4, arg5, arg6);
fcvt_r(arg1, arg2, p, arg4, arg5, arg6);
}
void test__fcvt_r__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fcvt_r(arg1, arg2, arg3, NULL, arg5, arg6);
fcvt_r(arg1, arg2, arg3, p, arg5, arg6);
}
void test__fcvt_r__arg5__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
fcvt_r(arg1, arg2, arg3, arg4, NULL, arg6);
fcvt_r(arg1, arg2, arg3, arg4, p, arg6);
}
void test__fcvt_r__arg6__notuninit() {
@ -428,18 +447,21 @@ void test__qecvt_r__arg2__notuninit() {
}
void test__qecvt_r__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qecvt_r(arg1, arg2, NULL, arg4, arg5, arg6);
qecvt_r(arg1, arg2, p, arg4, arg5, arg6);
}
void test__qecvt_r__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qecvt_r(arg1, arg2, arg3, NULL, arg5, arg6);
qecvt_r(arg1, arg2, arg3, p, arg5, arg6);
}
void test__qecvt_r__arg5__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qecvt_r(arg1, arg2, arg3, arg4, NULL, arg6);
qecvt_r(arg1, arg2, arg3, arg4, p, arg6);
}
void test__qecvt_r__arg6__notuninit() {
@ -473,18 +495,21 @@ void test__qfcvt_r__arg2__notuninit() {
}
void test__qfcvt_r__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qfcvt_r(arg1, arg2, NULL, arg4, arg5, arg6);
qfcvt_r(arg1, arg2, p, arg4, arg5, arg6);
}
void test__qfcvt_r__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qfcvt_r(arg1, arg2, arg3, NULL, arg5, arg6);
qfcvt_r(arg1, arg2, arg3, p, arg5, arg6);
}
void test__qfcvt_r__arg5__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
qfcvt_r(arg1, arg2, arg3, arg4, NULL, arg6);
qfcvt_r(arg1, arg2, arg3, arg4, p, arg6);
}
void test__qfcvt_r__arg6__notuninit() {
@ -517,8 +542,9 @@ void test__strcasestr__leakignore() {
}
void test__strcasestr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strcasestr(NULL, arg2);
result = strcasestr(p, arg2);
}
void test__strcasestr__arg1__notuninit() {
@ -528,8 +554,9 @@ void test__strcasestr__arg1__notuninit() {
}
void test__strcasestr__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strcasestr(arg1, NULL);
result = strcasestr(arg1, p);
}
void test__strcasestr__arg2__notuninit() {
@ -557,18 +584,21 @@ void test__getresuid__leakignore() {
}
void test__getresuid__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresuid(NULL, arg2, arg3);
getresuid(p, arg2, arg3);
}
void test__getresuid__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresuid(arg1, NULL, arg3);
getresuid(arg1, p, arg3);
}
void test__getresuid__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresuid(arg1, arg2, NULL);
getresuid(arg1, arg2, p);
}
void test__getresgid__noreturn() {
@ -590,18 +620,21 @@ void test__getresgid__leakignore() {
}
void test__getresgid__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresgid(NULL, arg2, arg3);
getresgid(p, arg2, arg3);
}
void test__getresgid__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresgid(arg1, NULL, arg3);
getresgid(arg1, p, arg3);
}
void test__getresgid__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
getresgid(arg1, arg2, NULL);
getresgid(arg1, arg2, p);
}
void test__setresuid__noreturn() {
@ -680,8 +713,9 @@ void test__inet_aton__leakignore() {
}
void test__inet_aton__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_aton(NULL, arg2);
inet_aton(p, arg2);
}
void test__inet_aton__arg1__notuninit() {
@ -691,8 +725,9 @@ void test__inet_aton__arg1__notuninit() {
}
void test__inet_aton__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_aton(arg1, NULL);
inet_aton(arg1, p);
}
void test__inet_addr__noreturn() {
@ -709,8 +744,9 @@ void test__inet_addr__leakignore() {
}
void test__inet_addr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_addr(NULL);
inet_addr(p);
}
void test__inet_addr__arg1__notuninit() {
@ -733,8 +769,9 @@ void test__inet_network__leakignore() {
}
void test__inet_network__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_network(NULL);
inet_network(p);
}
void test__inet_network__arg1__notuninit() {
@ -845,8 +882,9 @@ void test__inet_pton__arg1__notuninit() {
}
void test__inet_pton__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_pton(arg1, NULL, arg3);
inet_pton(arg1, p, arg3);
}
void test__inet_pton__arg2__notuninit() {
@ -856,8 +894,9 @@ void test__inet_pton__arg2__notuninit() {
}
void test__inet_pton__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_pton(arg1, arg2, NULL);
inet_pton(arg1, arg2, p);
}
void test__inet_ntop__noreturn() {
@ -880,8 +919,9 @@ void test__inet_ntop__arg1__notuninit() {
}
void test__inet_ntop__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_ntop(arg1, NULL, arg3, arg4);
inet_ntop(arg1, p, arg3, arg4);
}
void test__inet_ntop__arg2__notuninit() {
@ -891,8 +931,9 @@ void test__inet_ntop__arg2__notuninit() {
}
void test__inet_ntop__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
inet_ntop(arg1, arg2, NULL, arg4);
inet_ntop(arg1, arg2, p, arg4);
}
void test__inet_ntop__arg4__notuninit() {
@ -920,8 +961,9 @@ void test__canonicalize_file_name__leakignore() {
}
void test__canonicalize_file_name__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = canonicalize_file_name(NULL);
result = canonicalize_file_name(p);
}
void test__execvpe__noreturn() {
@ -938,8 +980,9 @@ void test__execvpe__leakignore() {
}
void test__execvpe__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
execvpe(NULL, arg2, arg3);
execvpe(p, arg2, arg3);
}
void test__execvpe__arg1__notuninit() {
@ -974,8 +1017,9 @@ void test__mkostemp__leakignore() {
}
void test__mkostemp__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
mkostemp(NULL, arg2);
mkostemp(p, arg2);
}
void test__mkostemp__arg1__notuninit() {
@ -1004,8 +1048,9 @@ void test__mkstemps__leakignore() {
}
void test__mkstemps__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
mkstemps(NULL, arg2);
mkstemps(p, arg2);
}
void test__mkstemps__arg1__notuninit() {
@ -1034,8 +1079,9 @@ void test__mkostemps__leakignore() {
}
void test__mkostemps__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
mkostemps(NULL, arg2, arg3);
mkostemps(p, arg2, arg3);
}
void test__mkostemps__arg1__notuninit() {
@ -1075,8 +1121,9 @@ void test__memmem__leakignore() {
}
void test__memmem__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = memmem(NULL, arg2, arg3, arg4);
result = memmem(p, arg2, arg3, arg4);
}
void test__memmem__arg1__notuninit() {
@ -1092,8 +1139,9 @@ void test__memmem__arg2__notuninit() {
}
void test__memmem__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = memmem(arg1, arg2, NULL, arg4);
result = memmem(arg1, arg2, p, arg4);
}
void test__memmem__arg3__notuninit() {
@ -1122,8 +1170,9 @@ void test__memrchr__leakignore() {
}
void test__memrchr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
memrchr(NULL, arg2, arg3);
memrchr(p, arg2, arg3);
}
void test__memrchr__arg1__notuninit() {
@ -1162,8 +1211,9 @@ void test__rawmemchr__leakignore() {
}
void test__rawmemchr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
rawmemchr(NULL, arg2);
rawmemchr(p, arg2);
}
void test__rawmemchr__arg1__notuninit() {
@ -1250,8 +1300,9 @@ void test__strchrnul__leakignore() {
}
void test__strchrnul__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = strchrnul(NULL, arg2);
result = strchrnul(p, arg2);
}
void test__strchrnul__arg1__notuninit() {
@ -1379,8 +1430,9 @@ void test__epoll_ctl__arg4__notbool() {
}
void test__epoll_ctl__arg4__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
epoll_ctl(arg1, arg2, arg3, NULL);
epoll_ctl(arg1, arg2, arg3, p);
}
void test__epoll_wait__noreturn() {
@ -1407,8 +1459,9 @@ void test__epoll_wait__arg2__notbool() {
}
void test__epoll_wait__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
epoll_wait(arg1, NULL, arg3, arg4);
epoll_wait(arg1, p, arg3, arg4);
}
void test__epoll_wait__arg3__notbool() {
@ -1457,8 +1510,9 @@ void test__epoll_pwait__arg2__notbool() {
}
void test__epoll_pwait__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
epoll_pwait(arg1, NULL, arg3, arg4, arg5);
epoll_pwait(arg1, p, arg3, arg4, arg5);
}
void test__epoll_pwait__arg3__notbool() {
@ -1489,8 +1543,9 @@ void test__epoll_pwait__arg5__notbool() {
}
void test__epoll_pwait__arg5__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
epoll_pwait(arg1, arg2, arg3, arg4, NULL);
epoll_pwait(arg1, arg2, arg3, arg4, p);
}
void test__epoll_pwait__arg5__notuninit() {

View File

@ -125,8 +125,9 @@ void test__XmStringCreateLocalized__leakignore() {
}
void test__XmStringCreateLocalized__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = XmStringCreateLocalized(NULL);
result = XmStringCreateLocalized(p);
}
void test__XmStringCreateLocalized__arg1__notuninit() {
@ -154,8 +155,9 @@ void test__XmStringCreateSimple__leakignore() {
}
void test__XmStringCreateSimple__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = XmStringCreateSimple(NULL);
result = XmStringCreateSimple(p);
}
void test__XmStringCreateSimple__arg1__notuninit() {
@ -229,8 +231,9 @@ void test__XmTextGetStringWcs__arg1__notuninit() {
}
void test__XtAsprintf__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
XtAsprintf(arg1, NULL);
XtAsprintf(arg1, p);
}
void test__XtAsprintf__arg2__notuninit() {

File diff suppressed because it is too large Load Diff

View File

@ -16,8 +16,9 @@ void test__connect__noreturn() {
}
void test__connect__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
connect(NULL, arg2, arg3, arg4);
connect(p, arg2, arg3, arg4);
}
void test__connect__arg1__notuninit() {
@ -33,8 +34,9 @@ void test__connect__arg2__notuninit() {
}
void test__connect__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
connect(arg1, arg2, NULL, arg4);
connect(arg1, arg2, p, arg4);
}
void test__connect__arg3__notuninit() {
@ -57,8 +59,9 @@ void test__disconnect__noreturn() {
}
void test__disconnect__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
disconnect(NULL, arg2, arg3, arg4);
disconnect(p, arg2, arg3, arg4);
}
void test__disconnect__arg1__notuninit() {
@ -74,8 +77,9 @@ void test__disconnect__arg2__notuninit() {
}
void test__disconnect__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
disconnect(arg1, arg2, NULL, arg4);
disconnect(arg1, arg2, p, arg4);
}
void test__disconnect__arg3__notuninit() {
@ -109,8 +113,9 @@ void test__tr__leakignore() {
}
void test__tr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = tr(NULL, arg2, arg3);
result = tr(p, arg2, arg3);
}
void test__tr__arg1__notuninit() {
@ -150,8 +155,9 @@ void test__QObject__tr__leakignore() {
}
void test__QObject__tr__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = QObject::tr(NULL, arg2, arg3);
result = QObject::tr(p, arg2, arg3);
}
void test__QObject__tr__arg1__notuninit() {
@ -186,8 +192,9 @@ void test__QSettings__setValue__leakignore() {
}
void test__QSettings__setValue__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
QSettings::setValue(NULL, arg2);
QSettings::setValue(p, arg2);
}
void test__QSettings__setValue__arg1__notuninit() {
@ -215,8 +222,9 @@ void test__QSettings__value__useretval() {
}
void test__QSettings__value__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
result = QSettings::value(NULL, arg2);
result = QSettings::value(p, arg2);
}
void test__QSettings__value__arg1__notuninit() {
@ -1521,8 +1529,9 @@ void test__QMetaObject__connectSlotsByName__leakignore() {
}
void test__QMetaObject__connectSlotsByName__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
QMetaObject::connectSlotsByName(NULL);
QMetaObject::connectSlotsByName(p);
}
void test__QDir__fromNativeSeparators__noreturn() {

View File

@ -21,8 +21,9 @@ void test__SDL_mutexP__arg1__notbool() {
}
void test__SDL_mutexP__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
SDL_mutexP(NULL);
SDL_mutexP(p);
}
void test__SDL_mutexV__noreturn() {
@ -38,8 +39,9 @@ void test__SDL_mutexV__arg1__notbool() {
}
void test__SDL_mutexV__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
SDL_mutexV(NULL);
SDL_mutexV(p);
}
void test__SDL_RWsize__noreturn() {
@ -55,8 +57,9 @@ void test__SDL_RWsize__arg1__notbool() {
}
void test__SDL_RWsize__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
SDL_RWsize(NULL);
SDL_RWsize(p);
}
void test__SDL_RWread__noreturn() {
@ -72,8 +75,9 @@ void test__SDL_RWread__arg1__notbool() {
}
void test__SDL_RWread__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
SDL_RWread(NULL, arg2);
SDL_RWread(p, arg2);
}
void test__SDL_RWread__arg2__notbool() {
@ -82,8 +86,9 @@ void test__SDL_RWread__arg2__notbool() {
}
void test__SDL_RWread__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
SDL_RWread(arg1, NULL);
SDL_RWread(arg1, p);
}
void test__IMG_isPNG__noreturn() {
@ -99,8 +104,9 @@ void test__IMG_isPNG__arg1__notbool() {
}
void test__IMG_isPNG__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
IMG_isPNG(NULL);
IMG_isPNG(p);
}
void test__IMG_isJPG__noreturn() {
@ -116,7 +122,8 @@ void test__IMG_isJPG__arg1__notbool() {
}
void test__IMG_isJPG__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
IMG_isJPG(NULL);
IMG_isJPG(p);
}

View File

@ -162,8 +162,9 @@ void test__sf__String__find__leakignore() {
}
void test__sf__String__find__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
sf::String::find(NULL, arg2);
sf::String::find(p, arg2);
}
void test__sf__String__find__arg1__notuninit() {
@ -1501,8 +1502,9 @@ void test__sf__Window__setIcon__arg2__notuninit() {
}
void test__sf__Window__setIcon__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
sf::Window::setIcon(arg1, arg2, NULL);
sf::Window::setIcon(arg1, arg2, p);
}
void test__sf__Window__setIcon__arg3__notuninit() {
@ -1537,8 +1539,9 @@ void test__sf__RenderWindow__setIcon__arg2__notuninit() {
}
void test__sf__RenderWindow__setIcon__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
sf::RenderWindow::setIcon(arg1, arg2, NULL);
sf::RenderWindow::setIcon(arg1, arg2, p);
}
void test__sf__RenderWindow__setIcon__arg3__notuninit() {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,9 @@ void test__wxString__Format__arg1__notbool() {
}
void test__wxString__Format__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxString::Format(NULL);
wxString::Format(p);
}
void test__wxString__Format__arg1__notuninit() {
@ -56,8 +57,9 @@ void test__wxString__Printf__arg1__notbool() {
}
void test__wxString__Printf__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxString::Printf(NULL);
wxString::Printf(p);
}
void test__wxString__Printf__arg1__notuninit() {
@ -350,8 +352,9 @@ void test__wxLogMessage__arg1__notbool() {
}
void test__wxLogMessage__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogMessage(NULL);
wxLogMessage(p);
}
void test__wxLogMessage__arg1__notuninit() {
@ -379,8 +382,9 @@ void test__wxLogVerbose__arg1__notbool() {
}
void test__wxLogVerbose__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogVerbose(NULL);
wxLogVerbose(p);
}
void test__wxLogVerbose__arg1__notuninit() {
@ -408,8 +412,9 @@ void test__wxLogWarning__arg1__notbool() {
}
void test__wxLogWarning__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogWarning(NULL);
wxLogWarning(p);
}
void test__wxLogWarning__arg1__notuninit() {
@ -437,8 +442,9 @@ void test__wxLogFatalError__arg1__notbool() {
}
void test__wxLogFatalError__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogFatalError(NULL);
wxLogFatalError(p);
}
void test__wxLogFatalError__arg1__notuninit() {
@ -466,8 +472,9 @@ void test__wxLogError__arg1__notbool() {
}
void test__wxLogError__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogError(NULL);
wxLogError(p);
}
void test__wxLogError__arg1__notuninit() {
@ -495,8 +502,9 @@ void test__wxLogTrace__arg2__notbool() {
}
void test__wxLogTrace__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogTrace(arg1, NULL);
wxLogTrace(arg1, p);
}
void test__wxLogTrace__arg2__notuninit() {
@ -524,8 +532,9 @@ void test__wxLogDebug__arg1__notbool() {
}
void test__wxLogDebug__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogDebug(NULL);
wxLogDebug(p);
}
void test__wxLogDebug__arg1__notuninit() {
@ -553,8 +562,9 @@ void test__wxLogSysError__arg1__notbool() {
}
void test__wxLogSysError__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogSysError(NULL);
wxLogSysError(p);
}
void test__wxLogSysError__arg1__notuninit() {
@ -588,8 +598,9 @@ void test__wxLogGeneric__arg2__notbool() {
}
void test__wxLogGeneric__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogGeneric(arg1, NULL);
wxLogGeneric(arg1, p);
}
void test__wxLogGeneric__arg2__notuninit() {
@ -617,8 +628,9 @@ void test__wxLogInfo__arg1__notbool() {
}
void test__wxLogInfo__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxLogInfo(NULL);
wxLogInfo(p);
}
void test__wxLogInfo__arg1__notuninit() {
@ -1179,8 +1191,9 @@ void test__wxTimer__SetOwner__leakignore() {
}
void test__wxTimer__SetOwner__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxTimer::SetOwner(NULL, arg2);
wxTimer::SetOwner(p, arg2);
}
void test__wxTimer__SetOwner__arg1__notuninit() {
@ -2582,8 +2595,9 @@ void test__wxArtProvider__Insert__leakignore() {
}
void test__wxArtProvider__Insert__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxArtProvider::Insert(NULL);
wxArtProvider::Insert(p);
}
void test__wxArtProvider__Insert__arg1__notuninit() {
@ -2700,8 +2714,9 @@ void test__wxDataViewCustomRenderer__Activate__arg1__notuninit() {
}
void test__wxDataViewCustomRenderer__Activate__arg2__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxDataViewCustomRenderer::Activate(arg1, NULL, arg3, arg4);
wxDataViewCustomRenderer::Activate(arg1, p, arg3, arg4);
}
void test__wxDataViewCustomRenderer__Activate__arg3__notuninit() {
@ -2742,8 +2757,9 @@ void test__wxDataViewCustomRenderer__LeftClick__arg2__notuninit() {
}
void test__wxDataViewCustomRenderer__LeftClick__arg3__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxDataViewCustomRenderer::LeftClick(arg1, arg2, NULL, arg4, arg5);
wxDataViewCustomRenderer::LeftClick(arg1, arg2, p, arg4, arg5);
}
void test__wxDataViewCustomRenderer__LeftClick__arg4__notuninit() {
@ -2809,8 +2825,9 @@ void test__wxDos2UnixFilename__leakignore() {
}
void test__wxDos2UnixFilename__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxDos2UnixFilename(NULL);
wxDos2UnixFilename(p);
}
void test__wxDos2UnixFilename__arg1__notuninit() {
@ -2857,8 +2874,9 @@ void test__wxSizerItem__SetWindow__leakignore() {
}
void test__wxSizerItem__SetWindow__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxSizerItem::SetWindow(NULL);
wxSizerItem::SetWindow(p);
}
void test__wxSizerItem__SetWindow__arg1__notuninit() {
@ -2881,8 +2899,9 @@ void test__wxSizerItem__SetSizer__leakignore() {
}
void test__wxSizerItem__SetSizer__arg1__notnull() {
const char *p = NULL;
// cppcheck-suppress nullPointer
wxSizerItem::SetSizer(NULL);
wxSizerItem::SetSizer(p);
}
void test__wxSizerItem__SetSizer__arg1__notuninit() {

View File

@ -192,7 +192,7 @@ static void testfunction(const tinyxml2::XMLElement *node, const std::string &fu
}
if (notnull) {
std::cout << testFunctionArg(functionName, useretval, "notnull", argNr, numberOfArgs, "", "nullPointer", "NULL") << std::endl << std::endl;
std::cout << testFunctionArg(functionName, useretval, "notnull", argNr, numberOfArgs, "const char *p = NULL;", "nullPointer", "p") << std::endl << std::endl;
}
if (notuninit) {