sh: Fix compiler warnings related to duplicate or missing declarations.
This commit is contained in:
parent
58c9460670
commit
bbd4d38fca
@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#ifdef SHELL
|
||||
#define main killcmd
|
||||
#include "bltin/bltin.h"
|
||||
#include "error.h"
|
||||
#endif
|
||||
|
||||
static void nosig(const char *);
|
||||
|
@ -81,6 +81,8 @@
|
||||
#define ARITH_QMARK 37
|
||||
#define ARITH_COLON 38
|
||||
|
||||
extern const char *arith_buf;
|
||||
|
||||
union yystype {
|
||||
arith_t val;
|
||||
char *name;
|
||||
|
@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#error Arithmetic tokens are out of order.
|
||||
#endif
|
||||
|
||||
extern const char *arith_buf;
|
||||
|
||||
int
|
||||
yylex(void)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -66,7 +66,6 @@ static const char rcsid[] =
|
||||
#ifdef SHELL
|
||||
#define main printfcmd
|
||||
#include "bltin/bltin.h"
|
||||
#include "error.h"
|
||||
#include "options.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user