summaryrefslogtreecommitdiffstats
path: root/bin/sh/main.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
committerjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
commit5e8a2136e77b00534434ca09013b82b54a34e781 (patch)
tree460140e6f2859387224bc3cf5cc7148cf75b3745 /bin/sh/main.c
parent6d0737d0cb83394edfef580d58950553333a6cc1 (diff)
downloadFreeBSD-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/main.c')
-rw-r--r--bin/sh/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index c21e8df..ece63c8 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -77,7 +77,7 @@ int rootpid;
int rootshell;
struct jmploc main_handler;
-STATIC void read_profile(char *);
+STATIC void read_profile(const char *);
STATIC char *find_dot_file(char *);
/*
@@ -248,7 +248,7 @@ cmdloop(int top)
*/
STATIC void
-read_profile(char *name)
+read_profile(const char *name)
{
int fd;
@@ -334,8 +334,6 @@ dotcmd(int argc, char **argv)
int
exitcmd(int argc, char **argv)
{
- extern int oexitstatus;
-
if (stoppedjobs())
return 0;
if (argc > 1)
OpenPOWER on IntegriCloud