sh: Fix more compiler warnings related to variable declarations.

This commit is contained in:
Jilles Tjoelker 2015-03-03 21:21:43 +00:00
parent fb0e21cfe8
commit 58bdb0761c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279569
5 changed files with 7 additions and 6 deletions

View File

@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
*/ */
#include "shell.h" #include "shell.h"
#include "eval.h"
#include "main.h" #include "main.h"
#include "options.h" #include "options.h"
#include "output.h" #include "output.h"
@ -64,7 +65,6 @@ struct jmploc *handler;
volatile sig_atomic_t exception; volatile sig_atomic_t exception;
volatile sig_atomic_t suppressint; volatile sig_atomic_t suppressint;
volatile sig_atomic_t intpending; volatile sig_atomic_t intpending;
char *commandname;
static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;

View File

@ -204,7 +204,7 @@ parsefield(void)
} }
char writer[] = "\ static const char writer[] = "\
/*\n\ /*\n\
* This file was generated by the mknodes program.\n\ * This file was generated by the mknodes program.\n\
*/\n\ */\n\

View File

@ -60,7 +60,7 @@ struct synclass {
}; };
/* Syntax classes */ /* Syntax classes */
struct synclass synclass[] = { static const struct synclass synclass[] = {
{ "CWORD", "character is nothing special" }, { "CWORD", "character is nothing special" },
{ "CNL", "newline character" }, { "CNL", "newline character" },
{ "CBACK", "a backslash character" }, { "CBACK", "a backslash character" },
@ -85,7 +85,7 @@ struct synclass synclass[] = {
* Syntax classes for is_ functions. Warning: if you add new classes * Syntax classes for is_ functions. Warning: if you add new classes
* you may have to change the definition of the is_in_name macro. * 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" }, { "ISDIGIT", "a digit" },
{ "ISUPPER", "an upper case letter" }, { "ISUPPER", "an upper case letter" },
{ "ISLOWER", "a lower case letter" }, { "ISLOWER", "a lower case letter" },
@ -94,7 +94,7 @@ struct synclass is_entry[] = {
{ NULL, NULL } { NULL, NULL }
}; };
static char writer[] = "\ static const char writer[] = "\
/*\n\ /*\n\
* This file was generated by the mksyntax program.\n\ * This file was generated by the mksyntax program.\n\
*/\n\ */\n\

View File

@ -94,6 +94,7 @@ struct var vps4;
static struct var voptind; static struct var voptind;
struct var vdisvfork; struct var vdisvfork;
struct localvar *localvars;
int forcelocal; int forcelocal;
static const struct varinit varinit[] = { static const struct varinit varinit[] = {

View File

@ -68,7 +68,7 @@ struct localvar {
}; };
struct localvar *localvars; extern struct localvar *localvars;
extern int forcelocal; extern int forcelocal;
extern struct var vifs; extern struct var vifs;