Closed psaavedra closed 7 months ago
Just for reference, this is the backported commit to the 2.14.x branch: https://github.com/psaavedra/shadow/commit/e1e95951b0b9553e801b57ccd153c42baa956caa. Already adapted to the differences between the branches.
Please split the commit into two separate commits. One for renaming the macro, and one for naming the parameter.
Please split the commit into two separate commits. One for renaming the macro, and one for naming the parameter.
Yes, makes much more sense. Done.
I've been thinking... Would you mind renaming the macro to MAYBE_UNUSED
instead of just UNUSED
? That's the name that the ISO C23 attribute has (and it is more precise), and UNUSED() is a macro name that's sometimes used for something different: discarding the return value of an expression.
And I also see something inconsistent (not your fault): sometimes we say int unused(x)
and others we say unused int x
. I'd like to use the second form always. Would you mind writing a separate patch that makes the use of this macro consistent? If you do this, please put that commit as the first one if you can.
Thanks!
PR updated with the suggestions from @alejandro-colomar.
Thanks!
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Also fixes #918 by adding the omitted parameter name in active_sessions_count.
Suggested-by: Alejandro Colomar alx@kernel.org