soltools/cpp/_eval.c | 3 ++- soltools/cpp/_getopt.c | 2 +- soltools/cpp/_lex.c | 2 +- soltools/cpp/_nlist.c | 3 ++- soltools/cpp/_tokens.c | 2 +- soltools/mkdepend/def.h | 16 ++++++++++++++++ soltools/mkdepend/include.c | 5 +---- soltools/mkdepend/main.c | 10 +++++----- soltools/mkdepend/parse.c | 3 +-- soltools/mkdepend/pr.c | 8 +------- 10 files changed, 31 insertions(+), 23 deletions(-)
New commits: commit 62ee434e336dac7523cace3b3acea6894ef3a509 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Jan 9 20:19:22 2017 +0100 loplugin:externvar Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18 diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c index f10fa79..84d8a79b 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 24a6cfb..4e609ba 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 fde7605..a8f874d 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 83516f4..3bd1a65 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 c764886..bac4216 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, diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index 74445a2..5e96a2b 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -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: */ diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index 6712b1a..e83ac0f 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -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) { diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index c156c19..997ba6d 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -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) { diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c index 01adafbb..250a6a6 100644 --- a/soltools/mkdepend/parse.c +++ b/soltools/mkdepend/parse.c @@ -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 ) { diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index 23a93f4..fe8d756 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits