From: Pablo Saavedra Date: Tue, 23 Jan 2024 07:33:37 +0000 (+0100) Subject: lib/, src/: Make the use of MAYBE_UNUSED macro consistent X-Git-Tag: 4.15.0-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9b4de3276b7ebac2213246abe40892144857c5;p=thirdparty%2Fshadow.git 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 Signed-off-by: Pablo Saavedra --- diff --git a/lib/logind.c b/lib/logind.c index 88f433148..ba7278ff0 100644 --- a/lib/logind.c +++ b/lib/logind.c @@ -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; diff --git a/src/grpconv.c b/src/grpconv.c index 2bed145e0..47bd2dbf3 100644 --- a/src/grpconv.c +++ b/src/grpconv.c @@ -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]); diff --git a/src/grpunconv.c b/src/grpunconv.c index 793208896..4981dbb81 100644 --- a/src/grpunconv.c +++ b/src/grpunconv.c @@ -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]); diff --git a/src/su.c b/src/su.c index 9639c78bf..58dad9fb7 100644 --- a/src/su.c +++ b/src/su.c @@ -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);