Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

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 #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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coding style and unused arguments
2 participants