Conversation
lib/loginprompt.c
Outdated
|
|
||
| static void | ||
| login_exit(int) | ||
| static void login_exit (MAYBE_UNUSED int sig) |
There was a problem hiding this comment.
If we really need to fix the regression, I'd like to not revert the commits. Instead, please call the parameters _ in a new commit. When there is more than one, please call them _, __, ___, etc.
There was a problem hiding this comment.
Got it. I'll squash these into one patch and use parameters like '_'.
There was a problem hiding this comment.
Sorry, after some thought, _ will collide with the _() function from GNU gettext. Also, __ is a reserved identifier.
So, we'll need _1, _2, ...
There was a problem hiding this comment.
@alejandro-colomar I just came back from a vacation. I will work on this ASAP. Thanks for your above _1 suggestion.
We cannot just uname these unused parameters because gcc 10 need them. There will be error like below with gcc 10: lib/copydir.c:103:11: error: parameter name omitted The Debian bullseye uses gcc 10 by default. Fixes: shadow-maint#1530 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
ea42e16 to
a2a0eff
Compare
|
@alejandro-colomar I've squashed the codes with extra fixes for the tests/unit directory. |
| format_attr(printf, 2, 3) | ||
| static void | ||
| error_acl(struct error_context *, const char *fmt, ...) | ||
| static void error_acl (MAYBE_UNUSED struct error_context *_1, const char *fmt, ...) |
There was a problem hiding this comment.
Please keep the return type in a separate line (and don't add white space).
| * TEST | ||
| **********************/ | ||
| static void test_active_sessions_count_return_ok(void **) | ||
| static void test_active_sessions_count_return_ok(MAYBE_UNUSED MAYBE_UNUSED void ** _1_1) |
There was a problem hiding this comment.
Why _1_1 instead of _1?
There was a problem hiding this comment.
Oh, and MAYBE_UNUSED is also dup'd. It seems some script went wrong. :)
There was a problem hiding this comment.
BTW, if you use a script, please document it in the commit message (script contents and/or shell session).
There was a problem hiding this comment.
I was manually changing things. Sorry for the typo. I think I was hitting Ctrl-y twice in emacs. I'll fix all the above issues and update this PR.
| @@ -9,6 +9,7 @@ | |||
| #include <assert.h> | |||
| #include <stdio.h> | |||
|
|
|||
There was a problem hiding this comment.
This PR fixes the error for gcc10:
error: parameter name omitted