updated generated cfg tests

This commit is contained in:
Daniel Marjamäki 2018-03-19 09:46:16 +01:00
parent 7d0b5f7c8d
commit 0d3ddd85b1
11 changed files with 41571 additions and 59620 deletions

File diff suppressed because it is too large Load Diff

View File

@ -8,324 +8,249 @@
// => 'unmatched suppression' warnings are false negatives. // => 'unmatched suppression' warnings are false negatives.
// //
void test__fts_open__noreturn() void test__fts_open__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_open(arg1, arg2, arg3); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_open(arg1, arg2, arg3);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_open__arg1__notuninit() void test__fts_open__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_open(x, arg2, arg3);
fts_open(x, arg2, arg3);
} }
void test__fts_open__arg2__notuninit() void test__fts_open__arg2__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_open(arg1, x, arg3);
fts_open(arg1, x, arg3);
} }
void test__fts_open__arg3__notnull() void test__fts_open__arg3__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer fts_open(arg1, arg2, NULL);
fts_open(arg1, arg2, NULL);
} }
void test__fts_open__arg3__notuninit() void test__fts_open__arg3__notuninit() {
{ int x[10];
int x[10]; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_open(arg1, arg2, x);
fts_open(arg1, arg2, x);
} }
void test__fts_read__noreturn() void test__fts_read__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_read(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_read(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_read__arg1__notnull() void test__fts_read__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer fts_read(NULL);
fts_read(NULL);
} }
void test__fts_read__arg1__notuninit() void test__fts_read__arg1__notuninit() {
{ int x[10];
int x[10]; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_read(x);
fts_read(x);
} }
void test__readpassphrase__noreturn() void test__readpassphrase__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; readpassphrase(arg1, arg2); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
readpassphrase(arg1, arg2);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__readpassphrase__arg1__notuninit() void test__readpassphrase__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar readpassphrase(x, arg2);
readpassphrase(x, arg2);
} }
void test__readpassphrase__arg2__notuninit() void test__readpassphrase__arg2__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar readpassphrase(arg1, x);
readpassphrase(arg1, x);
} }
void test__fts_set__noreturn() void test__fts_set__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_set(arg1, arg2, arg3); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_set(arg1, arg2, arg3);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_set__arg1__notuninit() void test__fts_set__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_set(x, arg2, arg3);
fts_set(x, arg2, arg3);
} }
void test__fts_set__arg2__notuninit() void test__fts_set__arg2__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_set(arg1, x, arg3);
fts_set(arg1, x, arg3);
} }
void test__fts_set__arg3__notuninit() void test__fts_set__arg3__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_set(arg1, arg2, x);
fts_set(arg1, arg2, x);
} }
void test__fts_set_clientptr__noreturn() void test__fts_set_clientptr__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_set_clientptr(arg1, arg2); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_set_clientptr(arg1, arg2);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_set_clientptr__arg1__notuninit() void test__fts_set_clientptr__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_set_clientptr(x, arg2);
fts_set_clientptr(x, arg2);
} }
void test__fts_set_clientptr__arg2__notuninit() void test__fts_set_clientptr__arg2__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_set_clientptr(arg1, x);
fts_set_clientptr(arg1, x);
} }
void test__fts_get_clientptr__noreturn() void test__fts_get_clientptr__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_get_clientptr(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_get_clientptr(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_get_clientptr__arg1__notuninit() void test__fts_get_clientptr__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_get_clientptr(x);
fts_get_clientptr(x);
} }
void test__fts_get_stream__noreturn() void test__fts_get_stream__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_get_stream(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_get_stream(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_get_stream__arg1__notuninit() void test__fts_get_stream__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_get_stream(x);
fts_get_stream(x);
} }
void test__fts_close__noreturn() void test__fts_close__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; fts_close(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
fts_close(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__fts_close__arg1__notuninit() void test__fts_close__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar fts_close(x);
fts_close(x);
} }
void test__readpassphrase__noreturn() void test__readpassphrase__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; readpassphrase(arg1, arg2, arg3, arg4); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
readpassphrase(arg1, arg2, arg3, arg4);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__readpassphrase__leakignore() void test__readpassphrase__leakignore() {
{ char *p = malloc(10); *p=0;
char *p = malloc(10); readpassphrase(p, arg2, arg3, arg4);
*p=0; // cppcheck-suppress memleak
readpassphrase(p, arg2, arg3, arg4);
// cppcheck-suppress memleak
} }
void test__readpassphrase__arg1__notuninit() void test__readpassphrase__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar readpassphrase(x, arg2, arg3, arg4);
readpassphrase(x, arg2, arg3, arg4);
} }
void test__readpassphrase__arg2__notnull() void test__readpassphrase__arg2__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer readpassphrase(arg1, NULL, arg3, arg4);
readpassphrase(arg1, NULL, arg3, arg4);
} }
void test__readpassphrase__arg3__notnull() void test__readpassphrase__arg3__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer readpassphrase(arg1, arg2, NULL, arg4);
readpassphrase(arg1, arg2, NULL, arg4);
} }
void test__readpassphrase__arg3__notuninit() void test__readpassphrase__arg3__notuninit() {
{ int x[10];
int x[10]; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar readpassphrase(arg1, arg2, x, arg4);
readpassphrase(arg1, arg2, x, arg4);
} }
void test__readpassphrase__arg4__notuninit() void test__readpassphrase__arg4__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar readpassphrase(arg1, arg2, arg3, x);
readpassphrase(arg1, arg2, arg3, x);
} }
void test__setfib__noreturn() void test__setfib__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; setfib(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
setfib(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__setfib__arg1__notuninit() void test__setfib__arg1__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar setfib(x);
setfib(x);
} }
void test__strtonum__noreturn() void test__strtonum__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; strtonum(arg1, arg2, arg3, arg4); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
strtonum(arg1, arg2, arg3, arg4);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__strtonum__leakignore() void test__strtonum__leakignore() {
{ char *p = malloc(10); *p=0;
char *p = malloc(10); strtonum(p, arg2, arg3, arg4);
*p=0; // cppcheck-suppress memleak
strtonum(p, arg2, arg3, arg4);
// cppcheck-suppress memleak
} }
void test__strtonum__arg1__notnull() void test__strtonum__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer strtonum(NULL, arg2, arg3, arg4);
strtonum(NULL, arg2, arg3, arg4);
} }
void test__strtonum__arg1__notuninit() void test__strtonum__arg1__notuninit() {
{ int x[10];
int x[10]; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar strtonum(x, arg2, arg3, arg4);
strtonum(x, arg2, arg3, arg4);
} }
void test__strtonum__arg2__notuninit() void test__strtonum__arg2__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar strtonum(arg1, x, arg3, arg4);
strtonum(arg1, x, arg3, arg4);
} }
void test__strtonum__arg3__notuninit() void test__strtonum__arg3__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar strtonum(arg1, arg2, x, arg4);
strtonum(arg1, arg2, x, arg4);
} }
void test__strtonum__arg4__notuninit() void test__strtonum__arg4__notuninit() {
{ int x;
int x; // cppcheck-suppress uninitvar
// cppcheck-suppress uninitvar strtonum(arg1, arg2, arg3, x);
strtonum(arg1, arg2, arg3, x);
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,153 +8,115 @@
// => 'unmatched suppression' warnings are false negatives. // => 'unmatched suppression' warnings are false negatives.
// //
void test__SDL_mutexP__noreturn() void test__SDL_mutexP__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; SDL_mutexP(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
SDL_mutexP(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__SDL_mutexP__arg1__notbool() void test__SDL_mutexP__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool SDL_mutexP(!x);
SDL_mutexP(!x);
} }
void test__SDL_mutexP__arg1__notnull() void test__SDL_mutexP__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer SDL_mutexP(NULL);
SDL_mutexP(NULL);
} }
void test__SDL_mutexV__noreturn() void test__SDL_mutexV__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; SDL_mutexV(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
SDL_mutexV(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__SDL_mutexV__arg1__notbool() void test__SDL_mutexV__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool SDL_mutexV(!x);
SDL_mutexV(!x);
} }
void test__SDL_mutexV__arg1__notnull() void test__SDL_mutexV__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer SDL_mutexV(NULL);
SDL_mutexV(NULL);
} }
void test__SDL_RWsize__noreturn() void test__SDL_RWsize__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; SDL_RWsize(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
SDL_RWsize(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__SDL_RWsize__arg1__notbool() void test__SDL_RWsize__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool SDL_RWsize(!x);
SDL_RWsize(!x);
} }
void test__SDL_RWsize__arg1__notnull() void test__SDL_RWsize__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer SDL_RWsize(NULL);
SDL_RWsize(NULL);
} }
void test__SDL_RWread__noreturn() void test__SDL_RWread__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; SDL_RWread(arg1, arg2); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
SDL_RWread(arg1, arg2);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__SDL_RWread__arg1__notbool() void test__SDL_RWread__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool SDL_RWread(!x, arg2);
SDL_RWread(!x, arg2);
} }
void test__SDL_RWread__arg1__notnull() void test__SDL_RWread__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer SDL_RWread(NULL, arg2);
SDL_RWread(NULL, arg2);
} }
void test__SDL_RWread__arg2__notbool() void test__SDL_RWread__arg2__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool SDL_RWread(arg1, !x);
SDL_RWread(arg1, !x);
} }
void test__SDL_RWread__arg2__notnull() void test__SDL_RWread__arg2__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer SDL_RWread(arg1, NULL);
SDL_RWread(arg1, NULL);
} }
void test__IMG_isPNG__noreturn() void test__IMG_isPNG__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; IMG_isPNG(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
IMG_isPNG(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__IMG_isPNG__arg1__notbool() void test__IMG_isPNG__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool IMG_isPNG(!x);
IMG_isPNG(!x);
} }
void test__IMG_isPNG__arg1__notnull() void test__IMG_isPNG__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer IMG_isPNG(NULL);
IMG_isPNG(NULL);
} }
void test__IMG_isJPG__noreturn() void test__IMG_isJPG__noreturn() {
{ int x = 1;
int x = 1; if (cond) { x=100; IMG_isJPG(arg1); }
if (cond) { // cppcheck-suppress shiftTooManyBits
x=100; x = 1 << x;
IMG_isJPG(arg1);
}
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
} }
void test__IMG_isJPG__arg1__notbool() void test__IMG_isJPG__arg1__notbool() {
{ // cppcheck-suppress invalidFunctionArgBool
// cppcheck-suppress invalidFunctionArgBool IMG_isJPG(!x);
IMG_isJPG(!x);
} }
void test__IMG_isJPG__arg1__notnull() void test__IMG_isJPG__arg1__notnull() {
{ // cppcheck-suppress nullPointer
// cppcheck-suppress nullPointer IMG_isJPG(NULL);
IMG_isJPG(NULL);
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff