Skip to content

Commit

Permalink
Appease latest PVS-Studio 7.29.80616.6568 (#414)
Browse files Browse the repository at this point in the history
* The NULL pointer test now additionally raises a V575 (*null pointer is
passed*) on top of the V618 (*dangerous use of function*), in the
`sirtest_failnulls` function in `tests/tests.c`.

  Suppressing this warning, because the test does this intentionally.

* Also, add `compile_commands.events.json` to the `.gitignore` file.

Signed-off-by: Jeffrey H. Johnson <[email protected]>
  • Loading branch information
johnsonjh authored Apr 10, 2024
1 parent 5593ad4 commit 9c1d7e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ orstlint.txt

# PVS
compile_commands.json
compile_commands.events.json
*.pvs
pvsreport/*
*.PVS-Studio.i
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ bool sirtest_failnulls(void) {
PRINT_EXPECTED_ERROR();

_sir_eqland(pass, sir_init(&si));
_sir_eqland(pass, !sir_info(NULL)); //-V618
_sir_eqland(pass, !sir_info(NULL)); //-V618 //-V575

if (pass)
PRINT_EXPECTED_ERROR();
Expand Down

0 comments on commit 9c1d7e6

Please sign in to comment.