Skip to content

Conversation

@marjoleinheyndrickx
Copy link
Contributor

In clang these two functions with an unused parameter give a Wunused-parameter warning. By removing the parametername the warning disappears.


template <typename U>
static Arena* GetArenaForAllocation(Rank2, const U* p) {
static Arena* GetArenaForAllocation(Rank2, const U*) {
Copy link
Contributor

Choose a reason for hiding this comment

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

inside google these are used. Please switch the suppression technique to

(void)p;

@marjoleinheyndrickx
Copy link
Contributor Author

Suppression technique is switched to void cast, as suggested.

@fowles
Copy link
Contributor

fowles commented Aug 16, 2022

Thanks for the PR. I will merge this after our CI system finishes

@fowles fowles merged commit 3919d23 into protocolbuffers:main Aug 17, 2022
@marjoleinheyndrickx marjoleinheyndrickx deleted the wunused-parameters branch August 17, 2022 15:24
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
…used-parameters

avoid unused-parameter warning for c++
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.

4 participants