Kaydet (Commit) 62ee434e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:externvar

Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18
üst 04900bf9
......@@ -46,8 +46,9 @@ struct pri
char pri;
char arity;
char ctype;
} priority[] =
};
static struct pri priority[] =
{
{
0, 0, 0
......
......@@ -25,7 +25,7 @@
#define EPR fprintf(stderr,
#define ERR(str, chr) if(opterr) { EPR "%s%c\n", str, chr); }
int opterr = 1;
static int opterr = 1;
int optind = 1;
int optopt;
char *optarg;
......
......@@ -73,7 +73,7 @@ struct fsm
int nextstate; /* enter this state if +ve */
};
/*const*/ struct fsm fsm[] = {
static /*const*/ struct fsm fsm[] = {
/* start state */
{START, {C_XX}, ACT(UNCLASS, S_SELF)},
{START, {' ', '\t', '\v'}, WS1},
......
......@@ -42,8 +42,9 @@ struct kwtab
char *kw;
int val;
int flag;
} kwtab[] =
};
static struct kwtab kwtab[] =
{
{"if", KIF, ISKW},
{"ifdef", KIFDEF, ISKW},
......
......@@ -34,7 +34,7 @@ static char *wbp = wbuf;
static int EBCDIC_ExternTokenDetected = 0;
static int EBCDIC_StartTokenDetected = 0;
unsigned char toLatin1[256] =
static unsigned char toLatin1[256] =
{
0x00, 0x01, 0x02, 0x03, 0x9c, 0x09, 0x86, 0x7f, 0x97, 0x8d,
0x8e, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13,
......
......@@ -191,4 +191,20 @@ void warning1(char *, ...);
void convert_slashes(char *);
char *append_slash(char *);
extern char * directives[];
extern struct inclist * inclistp;
extern char * objprefix;
extern char * objsuffix;
extern boolean printed;
extern boolean verbose;
extern boolean show_where_not;
extern boolean warn_multiple;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -38,12 +38,9 @@ int issymbolic(char * dir, char * component);
int exists_path(struct IncludesCollection*, char*);
extern struct inclist inclist[ MAXFILES ],
*inclistp;
extern struct inclist inclist[ MAXFILES ];
extern char *includedirs[ ];
extern char *notdotdot[ ];
extern boolean show_where_not;
extern boolean warn_multiple;
struct inclist *inc_path(char *file, char *include, boolean dot, struct IncludesCollection *incCollection)
{
......
......@@ -120,16 +120,16 @@ void redirect(char * makefile);
struct inclist inclist[ MAXFILES ],
*inclistp = inclist;
struct symhash *maininclist = NULL;
static struct symhash *maininclist = NULL;
char *filelist[ MAXFILES ];
char *includedirs[ MAXDIRS + 1 ];
char *notdotdot[ MAXDIRS ];
char *objprefix = "";
char *objsuffix = OBJSUFFIX;
char *startat = "# DO NOT DELETE";
int width = 78;
boolean append = FALSE;
static char *startat = "# DO NOT DELETE";
static int width = 78;
static boolean append = FALSE;
boolean printed = FALSE;
boolean verbose = FALSE;
boolean show_where_not = FALSE;
......@@ -161,7 +161,7 @@ catch (int sig)
struct sigaction sig_act;
#endif /* USGISH */
boolean native_win_slashes = FALSE;
static boolean native_win_slashes = FALSE;
int main(int argc, char **argv)
{
......
......@@ -38,7 +38,6 @@ int deftype ( char *line, struct filepointer *filep,
int zero_value(char *exp, struct filepointer *filep,
struct inclist *file_red, struct symhash *symbols);
extern char *directives[];
extern struct symhash *maininclist;
int find_includes(struct filepointer *filep, struct inclist *file, struct inclist *file_red, int recursion, boolean failOK, struct IncludesCollection* incCollection, struct symhash *symbols)
......@@ -361,7 +360,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
* HACK! - so that we do not have to introduce 'symbols' in each cppsetup.c
* function... It's safe, functions from cppsetup.c don't return here.
*/
struct symhash *global_symbols = NULL;
static struct symhash *global_symbols = NULL;
char * isdefined( char *symbol )
{
......
......@@ -31,14 +31,8 @@ in this Software without prior written authorization from the X Consortium.
#include <string.h>
size_t pr( struct inclist *ip, char *file,char *base);
extern struct inclist inclist[ MAXFILES ],
*inclistp;
extern char *objprefix;
extern char *objsuffix;
extern struct inclist inclist[ MAXFILES ];
extern int width;
extern boolean printed;
extern boolean verbose;
extern boolean show_where_not;
void add_include(struct filepointer *filep, struct inclist *file, struct inclist *file_red, char *include, boolean dot, boolean failOK, struct IncludesCollection* incCollection, struct symhash *symbols)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment