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

Coding style: allow 'unused_' prefix, recomment prototype == definition #50

Closed
wants to merge 1 commit into from

Conversation

levitte
Copy link
Member

@levitte levitte commented Apr 29, 2018

On the subject of function parameters, recommended choice is to have
the prototype match the function definition, including parameter
names. For better clarity when the need arises, unused parameters may
be prefixed with 'unused_', but only in the function definition, not
the prototype.

Fixes #48

On the subject of function parameters, recommended choice is to have
the prototype match the function definition, including parameter
names.  For better clarity when the need arises, unused parameters may
be prefixed with 'unused_', but only in the function definition, not
the prototype.

Fixes openssl#48
@levitte
Copy link
Member Author

levitte commented Apr 29, 2018

Note: I'm pondering a proposal that's been made internally, that allows parameter names in the prototype to become comments, like this:

int OPENSSL_foo(char * /* bar */, size_t /* barlen */);

The benefit is that it avoids clashes when another header that contains something like this is included as well:

#define bar     (10)

@richsalz
Copy link
Contributor

This needs team discussion and vote, right?

@levitte
Copy link
Member Author

levitte commented Apr 29, 2018

I think so.

@levitte
Copy link
Member Author

levitte commented May 6, 2022

Because the coding style guide has moved and being edited since this, I'm dropping it. This didn't get any traction, so...

@levitte levitte closed this May 6, 2022
@levitte levitte deleted the codingstyle-function_params branch May 6, 2022 12:57
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.

coding style and unused arguments
2 participants