Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jan 8, 2024
1 parent 4fc0a1f commit a40ecfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,7 @@ void uninitvar_fdim(void)

void uninitvar_fclose(void)
{
// cppcheck-suppress unassignedVariable
FILE *stream;
// cppcheck-suppress uninitvar
(void)std::fclose(stream);
Expand Down Expand Up @@ -1815,6 +1816,7 @@ void uninitvar_fread(void)

void uninitvar_free(void)
{
// cppcheck-suppress unassignedVariable
void *block;
// cppcheck-suppress uninitvar
std::free(block);
Expand Down Expand Up @@ -4863,6 +4865,7 @@ void std_vector_data_arithmetic()

void memleak_std_malloc() // #12332
{
//cppcheck-suppress [unreadVariable, constVariablePointer]
void* p = std::malloc(1);
//cppcheck-suppress memleak
}
Expand Down

0 comments on commit a40ecfc

Please sign in to comment.