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

NoNewGlobals for Comm::AcceptLimiter::Instance_ #1954

Closed
wants to merge 2 commits into from

Conversation

kinkie
Copy link
Contributor

@kinkie kinkie commented Nov 28, 2024

Inspired by Coverity. CID 1441988: Useless call (USELESS_CALL).

Detected by Coverity, CID 1441988, "Useless call".
comm_init calls Comm::AcceptLimiter::Instance()
for its side effects, but ignores the return value.
Explicitly instruct the compiler to do that
@rousskov rousskov changed the title Maintenance: explicitly ignore return value in comm.cc Maintenance: Clarify AcceptLimiter::Instance() call intent Nov 29, 2024
rousskov
rousskov previously approved these changes Nov 29, 2024
src/comm.cc Outdated Show resolved Hide resolved
@rousskov rousskov added the S-waiting-for-author author action is expected (and usually required) label Nov 29, 2024
@kinkie kinkie added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box S-waiting-for-more-reviewers needs a reviewer and/or a second opinion and removed S-waiting-for-author author action is expected (and usually required) labels Nov 30, 2024
@rousskov rousskov changed the title Maintenance: Clarify AcceptLimiter::Instance() call intent Maintenance: Removed Comm::AcceptLimiter::Instance_ global Nov 30, 2024
Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for improving this code and addressing Coverity defect at the same time!

I have adjusted PR title to better (IMO) reflect current PR state. I have also removed a technical problem and a misspelling from PR description. Please adjust further as needed.

@rousskov rousskov added S-waiting-for-author author action is expected (and usually required) and removed S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box labels Nov 30, 2024
squid-anubis pushed a commit that referenced this pull request Nov 30, 2024
Inspired by Coverity. CID 1441988: Useless call (USELESS_CALL).
@squid-anubis squid-anubis added M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Nov 30, 2024
@kinkie
Copy link
Contributor Author

kinkie commented Dec 1, 2024

Thank you for improving this code and addressing Coverity defect at the same time!

I have adjusted PR title to better (IMO) reflect current PR state. I have also removed a technical problem and a misspelling from PR description. Please adjust further as needed.

I am confused by the change. Past PRs doing similar things (e.g #1750, #1781 , #1791, #1766, and more) used the NoNewGlobals identifier. Why is this PR not following the same convention?

@squid-anubis squid-anubis removed the M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 1, 2024
squid-anubis pushed a commit that referenced this pull request Dec 1, 2024
Inspired by Coverity. CID 1441988: Useless call (USELESS_CALL).
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 1, 2024
@rousskov rousskov changed the title Maintenance: Removed Comm::AcceptLimiter::Instance_ global NoNewGlobals for Comm::AcceptLimiter::Instance_ Dec 1, 2024
squid-anubis pushed a commit that referenced this pull request Dec 1, 2024
Inspired by Coverity. CID 1441988: Useless call (USELESS_CALL).
@rousskov
Copy link
Contributor

rousskov commented Dec 1, 2024

Past PRs doing similar things used the NoNewGlobals identifier. Why is this PR not following the same convention?

My mistake: When fixing PR title and looking for similar past PRs, I failed to find those NoNewGlobals commits. I should have paid more attention to insufficient number of matches in my search. Sorry.

Should be fixed now. Thank you for spotting this and trying to keep PR metadata up-to-date throughout changes.

@squid-anubis squid-anubis added M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Dec 1, 2024
squid-anubis pushed a commit that referenced this pull request Dec 1, 2024
Inspired by Coverity. CID 1441988: Useless call (USELESS_CALL).
@squid-anubis squid-anubis added M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Dec 1, 2024
@squid-anubis squid-anubis added the M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 1, 2024
@kinkie kinkie added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels and removed S-waiting-for-author author action is expected (and usually required) S-waiting-for-more-reviewers needs a reviewer and/or a second opinion labels Dec 1, 2024
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-passed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-merged https://github.com/measurement-factory/anubis#pull-request-labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants