Skip to content

Commit

Permalink
Adjust suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Nov 14, 2023
1 parent be7e4a8 commit d1fcc3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions test/cfg/gnu.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,14 @@ void memleak_asprintf(char **ptr, const char *fmt, const int arg)
if (-1 != asprintf(ptr,fmt,arg)) {
free(ptr);
}
if (-1 != asprintf(ptr,fmt,arg)) {
// TODO: Related to #8980 cppcheck-suppress memleak
}
if (-1 != asprintf(ptr,fmt,arg)) {}
// cppcheck-suppress memleak
}

void memleak_asprintf2() { // #12186
char* p = malloc(5);
// cppcheck-suppress memleak
(void)asprintf(&p, "%s", "test");
// cppcheck-suppress memleak
}

void memleak_xmalloc()
Expand Down
2 changes: 1 addition & 1 deletion test/cfg/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void resourceLeak_sqlite3_open()
sqlite3 * db;

sqlite3_open("/db", &db);
// TODO: cppcheck-suppress resourceLeak
// cppcheck-suppress resourceLeak
}

void ignoredReturnValue(const char * buf)
Expand Down

0 comments on commit d1fcc3c

Please sign in to comment.