Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++: Reduce number of FPs cpp/guarded-free and turn if(x) { free(x) } cases from FNs to TPs #17986

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Nov 14, 2024

The additional conditions to reduce FPs are maybe somewhat on the strict side, but given that a MRVA 1000 experiment already gives over 5k results, I don't think that this much of a problem. As far as I can tell there is just one remaining FP in MRVA (which occurs a few times), and which comes from the libpng library.

https://github.com/naturalatlas/node-gdal/blob/c83e7858a9ec566cc91d65db74fd07b99789c0f0/deps/libgdal/gdal/frmts/png/libpng/pngmem.c#L541-L560

Given that this is now the only FP, I did not investigate this further. I think we could promote the query with these changes from this PR.

Pull Request checklist

All query authors

Internal query authors only

  • Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • Adding a new query? Consider also adding the query to autofix.

@github-actions github-actions bot added the C++ label Nov 14, 2024
@jketema jketema requested a review from geoffw0 November 14, 2024 12:05
@jketema jketema marked this pull request as ready for review November 14, 2024 12:44
@jketema jketema requested a review from a team as a code owner November 14, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant