diff options
author | jilles <jilles@FreeBSD.org> | 2015-03-01 21:46:55 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-03-01 21:46:55 +0000 |
commit | bbd4d38fcaeebd7eda1dfb2906d1cd019f93e8b6 (patch) | |
tree | 8f9339bae861ac41857ef95632f9b0d69ac68a65 | |
parent | 58c94606707d60fc809e545dc78735fdbc57b06a (diff) | |
download | FreeBSD-src-bbd4d38fcaeebd7eda1dfb2906d1cd019f93e8b6.zip FreeBSD-src-bbd4d38fcaeebd7eda1dfb2906d1cd019f93e8b6.tar.gz |
sh: Fix compiler warnings related to duplicate or missing declarations.
-rw-r--r-- | bin/kill/kill.c | 1 | ||||
-rw-r--r-- | bin/sh/arith_yacc.h | 2 | ||||
-rw-r--r-- | bin/sh/arith_yylex.c | 2 | ||||
-rw-r--r-- | bin/sh/bltin/bltin.h | 2 | ||||
-rw-r--r-- | bin/sh/mktokens | 4 | ||||
-rw-r--r-- | bin/sh/options.h | 3 | ||||
-rw-r--r-- | usr.bin/printf/printf.c | 1 |
7 files changed, 6 insertions, 9 deletions
diff --git a/bin/kill/kill.c b/bin/kill/kill.c index b23c00a..bfa274b 100644 --- a/bin/kill/kill.c +++ b/bin/kill/kill.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #ifdef SHELL #define main killcmd #include "bltin/bltin.h" -#include "error.h" #endif static void nosig(const char *); diff --git a/bin/sh/arith_yacc.h b/bin/sh/arith_yacc.h index 5d8354f..ca92e6f 100644 --- a/bin/sh/arith_yacc.h +++ b/bin/sh/arith_yacc.h @@ -81,6 +81,8 @@ #define ARITH_QMARK 37 #define ARITH_COLON 38 +extern const char *arith_buf; + union yystype { arith_t val; char *name; diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c index ad08184..f7eaf3e 100644 --- a/bin/sh/arith_yylex.c +++ b/bin/sh/arith_yylex.c @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif -extern const char *arith_buf; - int yylex(void) { diff --git a/bin/sh/bltin/bltin.h b/bin/sh/bltin/bltin.h index bbf55f1..a530ab7 100644 --- a/bin/sh/bltin/bltin.h +++ b/bin/sh/bltin/bltin.h @@ -42,6 +42,7 @@ #include "../shell.h" #include "../mystring.h" #ifdef SHELL +#include "../error.h" #include "../output.h" #include "builtins.h" #define FILE struct output @@ -73,7 +74,6 @@ #include <unistd.h> pointer stalloc(int); -void error(const char *, ...) __printf0like(1, 2); int killjob(const char *, int); extern char *commandname; diff --git a/bin/sh/mktokens b/bin/sh/mktokens index 82d7cd7..b6f5f97 100644 --- a/bin/sh/mktokens +++ b/bin/sh/mktokens @@ -74,11 +74,11 @@ exec > token.h awk '{print "#define " $1 " " NR-1}' $temp echo ' /* Array indicating which tokens mark the end of a list */ -const char tokendlist[] = {' +static const char tokendlist[] = {' awk '{print "\t" $2 ","}' $temp echo '}; -const char *const tokname[] = {' +static const char *const tokname[] = {' sed -e 's/"/\\"/g' \ -e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \ $temp diff --git a/bin/sh/options.h b/bin/sh/options.h index 0994862..2048a35 100644 --- a/bin/sh/options.h +++ b/bin/sh/options.h @@ -73,6 +73,7 @@ struct optent { char val; }; +extern struct optent optlist[NOPTS]; #ifdef DEFINE_OPTIONS struct optent optlist[NOPTS] = { { "errexit", 'e', 0 }, @@ -95,8 +96,6 @@ struct optent optlist[NOPTS] = { { "physical", 'P', 0 }, { "trackall", 'h', 0 }, }; -#else -extern struct optent optlist[NOPTS]; #endif diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 452711e..8636cc1 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -66,7 +66,6 @@ static const char rcsid[] = #ifdef SHELL #define main printfcmd #include "bltin/bltin.h" -#include "error.h" #include "options.h" #endif |