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

chore: help Coverty avoid generating a false positive. #4817

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Aug 25, 2023

Description

Please see #4814 for background.

This PR does not change the pybind11 behavior at all when NDEBUG is set.

For Coverty use -UNDEBUG.

The variable name change was helpful in determining that we think of the Coverty result as a false positive. The name change could be reverted, but is useful to keep (increases readability).

Suggested changelog entry:

An ``assert()`` was added to help Coverty avoid generating a false positive.

… `assert()` in the only place where `curr_overl` could become `nullptr`.
@rwgk rwgk changed the title Related to PR #4814 (WIP) Help Coverty avoid generating a false positive. Aug 31, 2023
@rwgk rwgk marked this pull request as ready for review August 31, 2023 20:24
@henryiii
Copy link
Collaborator

henryiii commented Sep 1, 2023

Does current_overload cause some sort of wrapping? Why remove the last three chars?

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 1, 2023

Does current_overload cause some sort of wrapping? Why remove the last three chars?

Changed to current_overload.

The longer name is great, I don't have a strong preference one way or another.

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 1, 2023

Thanks Henry!

@rwgk rwgk merged commit c9638a1 into pybind:master Sep 1, 2023
82 checks passed
@rwgk rwgk deleted the pr4814_related branch September 1, 2023 18:31
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Sep 1, 2023
@henryiii henryiii changed the title Help Coverty avoid generating a false positive. chore: help Coverty avoid generating a false positive. Nov 15, 2023
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants