diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-21 11:52:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-21 17:11:15 +0200 |
commit | ec340697d682bd7d0a361c8c701e513329c032bd (patch) | |
tree | 97fddfce1e5cf6ad94fc32653b261a1668441ce0 /soltools/cpp | |
parent | 7a7cba91a60c1c6d6645dfb8c7e88c5c6318ddee (diff) |
loplugin:constparams in soltools and various
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'soltools/cpp')
-rw-r--r-- | soltools/cpp/_include.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_lex.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_macro.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_mcrvalid.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_tokens.c | 8 | ||||
-rw-r--r-- | soltools/cpp/cpp.h | 16 |
6 files changed, 16 insertions, 16 deletions
diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c index ba5866db1daf..1404aa4887a5 100644 --- a/soltools/cpp/_include.c +++ b/soltools/cpp/_include.c @@ -179,7 +179,7 @@ void * Generate a pragma import/include directive */ void - genimport(char *fname, int angled, char *iname, int import) + genimport(char const *fname, int angled, char const *iname, int import) { static Token ta = {UNCLASS, 0, 0, NULL, 0}; static Tokenrow tr = {&ta, &ta, &ta + 1, 1}; diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c index 94f218a536ef..6a5becb32679 100644 --- a/soltools/cpp/_lex.c +++ b/soltools/cpp/_lex.c @@ -645,7 +645,7 @@ int * if fd==-1 and str, then from the string. */ Source * - setsource(char *name, int path, int fd, char *str, int wrap) + setsource(char *name, int path, int fd, char const *str, int wrap) { Source *s = new(Source); size_t len; diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index 0a64b060152c..a5e5b931d431 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -624,7 +624,7 @@ void * corresponding index in the argname array. Return -1 if not found. */ int - lookuparg(Nlist * mac, Token * tp) + lookuparg(Nlist * mac, Token const * tp) { Token *ap; diff --git a/soltools/cpp/_mcrvalid.c b/soltools/cpp/_mcrvalid.c index 7a64de71da64..637706530180 100644 --- a/soltools/cpp/_mcrvalid.c +++ b/soltools/cpp/_mcrvalid.c @@ -83,7 +83,7 @@ mvl_add( MacroValidatorList * inout_pValidators, void mvl_check( MacroValidatorList * inout_pValidators, - Token * inout_pTokenToCheck) + Token const * inout_pTokenToCheck) { MacroValidator * pV; /* Running pointer */ MacroValidator * pCheckedOnes; /* Here new list is built. */ diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c index 097b627e88b6..4c73421b92da 100644 --- a/soltools/cpp/_tokens.c +++ b/soltools/cpp/_tokens.c @@ -251,7 +251,7 @@ int * Canonical whitespace is assured on each side. */ void - insertrow(Tokenrow * dtr, int ntok, Tokenrow * str) + insertrow(Tokenrow * dtr, int ntok, Tokenrow const * str) { int nrtok = (int)rowlen(str); @@ -289,7 +289,7 @@ void * Not strictly conforming. */ void - movetokenrow(Tokenrow * dtr, Tokenrow * str) + movetokenrow(Tokenrow * dtr, Tokenrow const * str) { size_t nby; @@ -325,7 +325,7 @@ void * the space for the contents. Return the destination. */ Tokenrow * - copytokenrow(Tokenrow * dtr, Tokenrow * str) + copytokenrow(Tokenrow * dtr, Tokenrow const * str) { int len = (int)rowlen(str); @@ -543,7 +543,7 @@ char * * Null terminated. */ uchar * - newstring(uchar * s, size_t l, size_t o) + newstring(uchar const * s, size_t l, size_t o) { uchar *ns = (uchar *) domalloc(l + o + 1); diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h index dc8dd8965e66..e09ea7db86f2 100644 --- a/soltools/cpp/cpp.h +++ b/soltools/cpp/cpp.h @@ -172,7 +172,7 @@ void mvl_add( void mvl_check( MacroValidatorList * inout_pValidators, - Token * inout_pTokenToCheck); + Token const * inout_pTokenToCheck); void tokenrow_zeroTokenIdentifiers(Tokenrow* trp); @@ -181,7 +181,7 @@ void fixlex(void); void setup(int, char **); int gettokens(Tokenrow *, int); int comparetokens(Tokenrow *, Tokenrow *); -Source *setsource(char *, int, int, char *, int); +Source *setsource(char *, int, int, char const *, int); void unsetsource(void); void puttokens(Tokenrow *); void process(Tokenrow *); @@ -203,25 +203,25 @@ int gatherargs(Tokenrow *, Tokenrow **, int *); void substargs(Nlist *, Tokenrow *, Tokenrow **); void expandrow(Tokenrow *, char *); void maketokenrow(int, Tokenrow *); -Tokenrow *copytokenrow(Tokenrow *, Tokenrow *); +Tokenrow *copytokenrow(Tokenrow *, Tokenrow const *); Token *growtokenrow(Tokenrow *); Tokenrow *normtokenrow(Tokenrow *); void adjustrow(Tokenrow *, int); -void movetokenrow(Tokenrow *, Tokenrow *); -void insertrow(Tokenrow *, int, Tokenrow *); +void movetokenrow(Tokenrow *, Tokenrow const *); +void insertrow(Tokenrow *, int, Tokenrow const *); void peektokens(Tokenrow *, char *); void doconcat(Tokenrow *); Tokenrow *stringify(Tokenrow *); -int lookuparg(Nlist *, Token *); +int lookuparg(Nlist *, Token const *); long eval(Tokenrow *, int); void genline(void); -void genimport(char *, int, char *, int); +void genimport(char const *, int, char const *, int); void genwrap(int); void setempty(Tokenrow *); void makespace(Tokenrow *, Token *); char *outnum(char *, int); int digit(int); -uchar *newstring(uchar *, size_t, size_t); +uchar *newstring(uchar const *, size_t, size_t); #define rowlen(tokrow) ((tokrow)->lp - (tokrow)->bp) |