]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/su.c: Fix type of variable
authorAlejandro Colomar <alx@kernel.org>
Wed, 13 Dec 2023 14:46:53 +0000 (15:46 +0100)
committerSerge Hallyn <serge@hallyn.com>
Wed, 13 Dec 2023 15:06:59 +0000 (09:06 -0600)
su.c:678:26: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘const void *’ [-Wformat=]
su.c:681:44: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘const void *’ [-Wformat=]
su.c:683:46: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘const void *’ [-Wformat=]

Reported-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/su.c

index 362841fb882ec8ce0ae2a8fce1bb973e65f8c448..976334eba8abea5c2b43eff4a576c0a2b85c2675 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -643,8 +643,8 @@ static /*@only@*/struct passwd * check_perms (void)
 static /*@only@*/struct passwd * do_check_perms (void)
 {
 #ifdef USE_PAM
-       const void *tmp_name;
-       int ret;
+       int         ret;
+       const char  *tmp_name;
 #endif                         /* !USE_PAM */
        /*
         * The password file entries for the user is gotten and the account