diff options
author | jilles <jilles@FreeBSD.org> | 2015-03-03 21:21:43 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-03-03 21:21:43 +0000 |
commit | b5c07cff76dc0055eb236091bad7d5987f75f58d (patch) | |
tree | 07d2b58c53d3dba7f94541f25700fec50370d2e5 /bin/sh | |
parent | d696383c0b0ac2aa018ac278851620c93c63ccc7 (diff) | |
download | FreeBSD-src-b5c07cff76dc0055eb236091bad7d5987f75f58d.zip FreeBSD-src-b5c07cff76dc0055eb236091bad7d5987f75f58d.tar.gz |
sh: Fix more compiler warnings related to variable declarations.
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/error.c | 2 | ||||
-rw-r--r-- | bin/sh/mknodes.c | 2 | ||||
-rw-r--r-- | bin/sh/mksyntax.c | 6 | ||||
-rw-r--r-- | bin/sh/var.c | 1 | ||||
-rw-r--r-- | bin/sh/var.h | 2 |
5 files changed, 7 insertions, 6 deletions
diff --git a/bin/sh/error.c b/bin/sh/error.c index fedffaa..6057226 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); */ #include "shell.h" +#include "eval.h" #include "main.h" #include "options.h" #include "output.h" @@ -64,7 +65,6 @@ struct jmploc *handler; volatile sig_atomic_t exception; volatile sig_atomic_t suppressint; volatile sig_atomic_t intpending; -char *commandname; static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; diff --git a/bin/sh/mknodes.c b/bin/sh/mknodes.c index 1a177f8..cb88301 100644 --- a/bin/sh/mknodes.c +++ b/bin/sh/mknodes.c @@ -204,7 +204,7 @@ parsefield(void) } -char writer[] = "\ +static const char writer[] = "\ /*\n\ * This file was generated by the mknodes program.\n\ */\n\ diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c index c6bf480..1f81828 100644 --- a/bin/sh/mksyntax.c +++ b/bin/sh/mksyntax.c @@ -60,7 +60,7 @@ struct synclass { }; /* Syntax classes */ -struct synclass synclass[] = { +static const struct synclass synclass[] = { { "CWORD", "character is nothing special" }, { "CNL", "newline character" }, { "CBACK", "a backslash character" }, @@ -85,7 +85,7 @@ struct synclass synclass[] = { * Syntax classes for is_ functions. Warning: if you add new classes * you may have to change the definition of the is_in_name macro. */ -struct synclass is_entry[] = { +static const struct synclass is_entry[] = { { "ISDIGIT", "a digit" }, { "ISUPPER", "an upper case letter" }, { "ISLOWER", "a lower case letter" }, @@ -94,7 +94,7 @@ struct synclass is_entry[] = { { NULL, NULL } }; -static char writer[] = "\ +static const char writer[] = "\ /*\n\ * This file was generated by the mksyntax program.\n\ */\n\ diff --git a/bin/sh/var.c b/bin/sh/var.c index 87d7b80..f60dea1 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -94,6 +94,7 @@ struct var vps4; static struct var voptind; struct var vdisvfork; +struct localvar *localvars; int forcelocal; static const struct varinit varinit[] = { diff --git a/bin/sh/var.h b/bin/sh/var.h index 6ce5b24..6e831ae 100644 --- a/bin/sh/var.h +++ b/bin/sh/var.h @@ -68,7 +68,7 @@ struct localvar { }; -struct localvar *localvars; +extern struct localvar *localvars; extern int forcelocal; extern struct var vifs; |