lib/, src/: Make the use of MAYBE_UNUSED macro consistent
There is an inconsistent use of the MAYBE_UNUSED macro. Sometimes the `int unused(x)` form is used form and others the `unused int x`. We'd like to use the second form always. Related-To: https://github.com/shadow-maint/shadow/issues/918 Suggested-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
This commit is contained in:
committed by
Iker Pedrosa
parent
5d5d212764
commit
cd9b4de327
+1
-1
@@ -36,7 +36,7 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned long active_sessions_count(const char *name, unsigned long MAYBE_UNUSED(limit))
|
||||
unsigned long active_sessions_count(const char *name, MAYBE_UNUSED unsigned long limit)
|
||||
{
|
||||
struct passwd *pw;
|
||||
unsigned long count = 0;
|
||||
|
||||
+1
-1
@@ -262,7 +262,7 @@ int main (int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
#else /* !SHADOWGRP */
|
||||
int main (int MAYBE_UNUSED(argc), char **argv)
|
||||
int main (MAYBE_UNUSED int argc, char **argv)
|
||||
{
|
||||
fprintf (stderr,
|
||||
"%s: not configured for shadow group support.\n", argv[0]);
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ int main (int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
#else /* !SHADOWGRP */
|
||||
int main (int MAYBE_UNUSED(argc), char **argv)
|
||||
int main (MAYBE_UNUSED int argc, char **argv)
|
||||
{
|
||||
fprintf (stderr,
|
||||
"%s: not configured for shadow group support.\n", argv[0]);
|
||||
|
||||
@@ -111,7 +111,7 @@ static void execve_shell (const char *shellname,
|
||||
char *args[],
|
||||
char *const envp[]);
|
||||
#ifdef USE_PAM
|
||||
static void kill_child (int MAYBE_UNUSED(s));
|
||||
static void kill_child (MAYBE_UNUSED int s);
|
||||
static void prepare_pam_close_session (void);
|
||||
#else /* !USE_PAM */
|
||||
static void die (int);
|
||||
@@ -165,7 +165,7 @@ static bool iswheel (const char *username)
|
||||
return is_on_list (grp->gr_mem, username);
|
||||
}
|
||||
#else /* USE_PAM */
|
||||
static void kill_child (int MAYBE_UNUSED(s))
|
||||
static void kill_child (MAYBE_UNUSED int s)
|
||||
{
|
||||
if (0 != pid_child) {
|
||||
(void) kill (-pid_child, SIGKILL);
|
||||
|
||||
Reference in New Issue
Block a user