diff options
author | jilles <jilles@FreeBSD.org> | 2009-12-27 18:04:05 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-12-27 18:04:05 +0000 |
commit | 5e8a2136e77b00534434ca09013b82b54a34e781 (patch) | |
tree | 460140e6f2859387224bc3cf5cc7148cf75b3745 /bin/sh/var.c | |
parent | 6d0737d0cb83394edfef580d58950553333a6cc1 (diff) | |
download | FreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.zip FreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.tar.gz |
sh: Various warning fixes (from WARNS=6 NO_WERROR=1):
- const
- initializations to silence -Wuninitialized (it was safe anyway)
- remove nested extern declarations
- rename "index" locals to "idx"
Diffstat (limited to 'bin/sh/var.c')
-rw-r--r-- | bin/sh/var.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/var.c b/bin/sh/var.c index 900a483..06a982b 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -132,9 +132,9 @@ STATIC int localevar(const char *); #ifdef mkinit INCLUDE "var.h" +MKINIT char **environ; INIT { char **envp; - extern char **environ; initvar(); for (envp = environ ; *envp ; envp++) { @@ -258,11 +258,11 @@ setvar(const char *name, const char *val, int flags) STATIC int localevar(const char *s) { - static char *lnames[7] = { + static const char *lnames[7] = { "ALL", "COLLATE", "CTYPE", "MONETARY", "NUMERIC", "TIME", NULL }; - char **ss; + const char **ss; if (*s != 'L') return 0; @@ -469,9 +469,9 @@ environment(void) * VSTACK set since these are currently allocated on the stack. */ -#ifdef mkinit MKINIT void shprocvar(void); +#ifdef mkinit SHELLPROC { shprocvar(); } |