From: Christian Göttsche Date: Tue, 24 Jan 2023 14:59:47 +0000 (+0100) Subject: Drop redundant declaration X-Git-Tag: 4.14.0-rc1~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43508ac4763591a5f05b884abeeed934b6748680;p=thirdparty%2Fshadow.git Drop redundant declaration environ is exported in . env.c:29:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls] 29 | extern char **environ; | ^~~~~~~ login.c:92:15: warning: redundant redeclaration of ‘environ’ [-Wredundant-decls] 92 | extern char **environ; | ^~~~~~~ sulogin.c:40:15: warning: redundant redeclaration of ‘environ’ [-Wredundant-decls] 40 | extern char **environ; | ^~~~~~~ newgrp.c:32:15: warning: redundant redeclaration of ‘environ’ [-Wredundant-decls] 32 | extern char **environ; | ^~~~~~~ --- diff --git a/libmisc/env.c b/libmisc/env.c index fc6dbcedd..c6ab67276 100644 --- a/libmisc/env.c +++ b/libmisc/env.c @@ -26,7 +26,6 @@ #define NEWENVP_STEP 16 size_t newenvc = 0; /*@null@*/char **newenvp = NULL; -extern char **environ; static const char *const forbid[] = { "_RLD_=", diff --git a/src/login.c b/src/login.c index c55f4de0a..ea2b52ee4 100644 --- a/src/login.c +++ b/src/login.c @@ -89,7 +89,6 @@ static char tmsg[256]; extern char **newenvp; extern size_t newenvc; -extern char **environ; #ifndef ALARM #define ALARM 60 diff --git a/src/newgrp.c b/src/newgrp.c index ac18f0ca1..d04dace11 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -29,7 +29,6 @@ const char *Prog; extern char **newenvp; -extern char **environ; #ifdef HAVE_SETGROUPS static int ngroups; diff --git a/src/sulogin.c b/src/sulogin.c index ddb0d451f..0d5b411dc 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -37,8 +37,6 @@ static struct passwd pwent; extern char **newenvp; extern size_t newenvc; -extern char **environ; - #ifndef ALARM #define ALARM 60 #endif