From 7ea01578eed8459678369d0256de016930b3af40 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Oct 2018 13:04:43 +0200 Subject: loplugin:staticvar in soltools..svx Change-Id: Ie9f36eb0e00aaee34a27f136ed903f8f87e52dcc Reviewed-on: https://gerrit.libreoffice.org/61916 Tested-by: Jenkins Reviewed-by: Noel Grandin --- soltools/cpp/_eval.c | 2 +- soltools/cpp/_lex.c | 4 ++-- soltools/cpp/_nlist.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'soltools') diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c index aabf212a8c31..3d19974da825 100644 --- a/soltools/cpp/_eval.c +++ b/soltools/cpp/_eval.c @@ -48,7 +48,7 @@ struct pri char const ctype; }; -static struct pri priority[] = +static const struct pri priority[] = { { 0, 0, 0 diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c index 466a16078d9d..8ba81d8e6d00 100644 --- a/soltools/cpp/_lex.c +++ b/soltools/cpp/_lex.c @@ -71,7 +71,7 @@ struct fsm int const nextstate; /* enter this state if +ve */ }; -static /*const*/ struct fsm fsm[] = { +static const struct fsm fsm[] = { /* start state */ {START, {C_XX}, ACT(UNCLASS, S_SELF)}, {START, {' ', '\t', '\v'}, WS1}, @@ -259,7 +259,7 @@ static short bigfsm[256][MAXSTATE]; void expandlex(void) { - /* const */ struct fsm *fp; + const struct fsm *fp; int i, j, nstate; for (fp = fsm; fp->state >= 0; fp++) diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c index b365cba5d7b3..3465021d6a4d 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -43,7 +43,7 @@ struct kwtab int const flag; }; -static struct kwtab kwtab[] = +static const struct kwtab kwtab[] = { {"if", KIF, ISKW}, {"ifdef", KIFDEF, ISKW}, @@ -76,7 +76,7 @@ unsigned long namebit[077 + 1]; void setup_kwtab(void) { - struct kwtab *kp; + struct kwtab const *kp; Nlist *np; Token t; static Token deftoken[1] = {{NAME, 0, 7, (uchar *) "defined", 0}}; -- cgit