From 43508ac4763591a5f05b884abeeed934b6748680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 24 Jan 2023 15:59:47 +0100 Subject: [PATCH] Drop redundant declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; | ^~~~~~~ --- libmisc/env.c | 1 - src/login.c | 1 - src/newgrp.c | 1 - src/sulogin.c | 2 -- 4 files changed, 5 deletions(-) diff --git a/libmisc/env.c b/libmisc/env.c index fc6dbced..c6ab6727 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 c55f4de0..ea2b52ee 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 ac18f0ca..d04dace1 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 ddb0d451..0d5b411d 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