diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-09 20:19:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-09 20:19:22 +0100 |
commit | 62ee434e336dac7523cace3b3acea6894ef3a509 (patch) | |
tree | 7833a504b866bb503676cc79577ba0dc41a0ef94 /soltools/cpp | |
parent | 04900bf971196a3b27473fd35d4726cd8cadd0e0 (diff) |
loplugin:externvar
Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18
Diffstat (limited to 'soltools/cpp')
-rw-r--r-- | soltools/cpp/_eval.c | 3 | ||||
-rw-r--r-- | soltools/cpp/_getopt.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_lex.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_nlist.c | 3 | ||||
-rw-r--r-- | soltools/cpp/_tokens.c | 2 |
5 files changed, 7 insertions, 5 deletions
diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c index f10fa7988bb5..84d8a79b5d44 100644 --- a/soltools/cpp/_eval.c +++ b/soltools/cpp/_eval.c @@ -46,8 +46,9 @@ struct pri char pri; char arity; char ctype; -} priority[] = +}; +static struct pri priority[] = { { 0, 0, 0 diff --git a/soltools/cpp/_getopt.c b/soltools/cpp/_getopt.c index 24a6cfb6199e..4e609bae92de 100644 --- a/soltools/cpp/_getopt.c +++ b/soltools/cpp/_getopt.c @@ -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; diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c index fde7605e8354..a8f874d6d464 100644 --- a/soltools/cpp/_lex.c +++ b/soltools/cpp/_lex.c @@ -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}, diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c index 83516f461ac1..3bd1a6557d9b 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -42,8 +42,9 @@ struct kwtab char *kw; int val; int flag; -} kwtab[] = +}; +static struct kwtab kwtab[] = { {"if", KIF, ISKW}, {"ifdef", KIFDEF, ISKW}, diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c index c764886593d6..bac421647035 100644 --- a/soltools/cpp/_tokens.c +++ b/soltools/cpp/_tokens.c @@ -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, |