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/mkdepend | |
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/mkdepend')
-rw-r--r-- | soltools/mkdepend/cppsetup.c | 2 | ||||
-rw-r--r-- | soltools/mkdepend/def.h | 16 | ||||
-rw-r--r-- | soltools/mkdepend/include.c | 10 | ||||
-rw-r--r-- | soltools/mkdepend/main.c | 8 | ||||
-rw-r--r-- | soltools/mkdepend/parse.c | 6 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 2 |
6 files changed, 22 insertions, 22 deletions
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c index 12b7d12ef55d..e731e9fb47c1 100644 --- a/soltools/mkdepend/cppsetup.c +++ b/soltools/mkdepend/cppsetup.c @@ -194,7 +194,7 @@ my_eval_variable (IfParser *ip, const char *var, size_t len) } -int cppsetup(char *line) +int cppsetup(char const *line) { IfParser ip; int val = 0; diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index 4c3649cb8369..2ab9a4845770 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -151,18 +151,18 @@ char *malloc(); char *realloc(); #endif -char *copy(char *); +char *copy(char const *); char *base_name(char *); char *get_line(struct filepointer *); char *isdefined(char *); struct filepointer *getfile(char *); -struct inclist *newinclude(char *newfile, - char *incstring); +struct inclist *newinclude(char const *newfile, + char const *incstring); struct inclist *inc_path(char *, char *, boolean, struct IncludesCollection *); void define( char *def, struct symhash **symbols ); -void hash_define(char *name, char * val, struct symhash **symbols); +void hash_define(char *name, char const * val, struct symhash **symbols); struct symhash *hash_copy( struct symhash *symbols ); void hash_free( struct symhash *symbols ); void freefile( struct filepointer * fp ); @@ -171,19 +171,19 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct IncludesCollection* incCollection, struct symhash *symbols); void included_by(struct inclist *ip, struct inclist * newfile); -int cppsetup(char *line); +int cppsetup(char const *line); 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); -int match(char *str, char **list); +int match(char const *str, char **list); void recursive_pr_include(struct inclist *head, char *file, char *base); void recursive_pr_dummy(struct inclist *head, char *file); void inc_clean(void); void fatalerr(char *, ...); -void warning(char *, ...); -void warning1(char *, ...); +void warning(char const *, ...); +void warning1(char const *, ...); void convert_slashes(char *); char *append_slash(char *); diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index e83ac0fbc24b..4fbc651f15a9 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from the X Consortium. #include <string.h> void remove_dotdot( char * ); -int isdot( char * ); -int isdotdot( char * ); +int isdot( char const * ); +int isdotdot( char const * ); int issymbolic(char * dir, char * component); int exists_path(struct IncludesCollection*, char*); @@ -223,14 +223,14 @@ void remove_dotdot(char *path) strcpy(path, newpath); } -int isdot(char *p) +int isdot(char const *p) { if(p && p[0] == '.' && p[1] == '\0') return TRUE; return FALSE; } -int isdotdot(char *p) +int isdotdot(char const *p) { if(p && p[0] == '.' && p[1] == '.' && p[2] == '\0') return TRUE; @@ -263,7 +263,7 @@ int issymbolic(char *dir, char *component) /* * Add an include file to the list of those included by 'file'. */ -struct inclist *newinclude(char *newfile, char *incstring) +struct inclist *newinclude(char const *newfile, char const *incstring) { struct inclist *ip; diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 80aad85f5274..dcd86838f7da 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -525,7 +525,7 @@ void freefile(struct filepointer *fp) free(fp); } -char *copy(char *str) +char *copy(char const *str) { char *p = (char *)malloc(strlen(str) + 1); @@ -533,7 +533,7 @@ char *copy(char *str) return p; } -int match(char *str, char **list) +int match(char const *str, char **list) { int i; @@ -670,7 +670,7 @@ void fatalerr(char *msg, ...) exit (1); } -void warning(char *msg, ...) +void warning(char const *msg, ...) { #ifdef DEBUG_MKDEPEND va_list args; @@ -683,7 +683,7 @@ void warning(char *msg, ...) #endif /* DEBUG_MKDEPEND */ } -void warning1(char *msg, ...) +void warning1(char const *msg, ...) { #ifdef DEBUG_MKDEPEND va_list args; diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c index 1da6448a253a..b538c87be22b 100644 --- a/soltools/mkdepend/parse.c +++ b/soltools/mkdepend/parse.c @@ -36,7 +36,7 @@ int gobble( struct filepointer *filep, struct inclist *file, struct inclist *file_red, struct symhash *symbols ); int deftype ( char *line, struct inclist *file, int parse_it, struct symhash *symbols); -int zero_value(char *exp, struct symhash *symbols); +int zero_value(char const *exp, struct symhash *symbols); extern struct symhash *maininclist; @@ -370,7 +370,7 @@ char * isdefined( char *symbol ) /* * Return type based on if the #if expression evaluates to 0 */ -int zero_value(char *exp, struct symhash *symbols) +int zero_value(char const *exp, struct symhash *symbols) { global_symbols = symbols; /* HACK! see above */ if (cppsetup(exp)) @@ -466,7 +466,7 @@ void hash_free( struct symhash *symbols ) free( symbols->s_pairs ); } -void hash_define( char *name, char *val, struct symhash **symbols ) +void hash_define( char *name, char const *val, struct symhash **symbols ) { int hashval; struct pair *it; diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index fe8d756a636c..9fd88877a8fd 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -73,7 +73,7 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist } } -void pr_dummy(struct inclist *ip) +void pr_dummy(struct inclist const *ip) { fwrite(ip->i_file, strlen(ip->i_file), 1, stdout); fwrite(" :\n\n", 4, 1, stdout); |