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

coverity fix, missing break #6327

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andyfox-rushc
Copy link
Contributor

No description provided.

Signed-off-by: andyfox-rushc <[email protected]>
Copy link
Contributor

github-actions bot commented Dec 8, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: andyfox-rushc <[email protected]>
Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: andyfox-rushc <[email protected]>
Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

@andyfox-rushc
Copy link
Contributor Author

In response to Ethan's request in another thread related to this pull request I have removed a number of pointer checks (which I had put in to calm coverity).

I think there is a general pattern which was causing the issue: when creating a buffer we rationally expect it to have valid iterms and to simply always be able to get the iterm safely. So I have added this api call:
odb::dbITerm* db_network::staToDb(buffer_ip_pin);

This one will check the type of the pin and return the iterm, & if not an iterm error out. It turns out that we are creating buffers all over the place and in all those cases want to get the iterm without being concerned with the possible bterm, modbterm, moditerm alternatives so this seems like a fair way of getting the iterm from the buffer pin.

The api call dbNetwork::flatPin -- will also attempt to return the iterm but will not error out, and instead return null (this is useful in its own right).

Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Member

Where is "another thread"?

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