diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-17 15:36:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-17 15:51:54 +0200 |
commit | a15715c34309416e76ebd2007a51ff6c42f28817 (patch) | |
tree | 8794c25b33abbcd8b050fe71dbd6576949741f0e /soltools | |
parent | 6fcc7efad066d6f3804196f3d3fbddd6a0a485cb (diff) |
-Wstrict-prototypes
...no reason to not have it enabled for URE C include files and what
little real C code is still left. (But note that Clang ignores that
warning.)
Change-Id: Ia6940f9f940a0c226e9b724331d65c9862ce32e6
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/mkdepend/cppsetup.c | 19 | ||||
-rw-r--r-- | soltools/mkdepend/def.h | 2 | ||||
-rw-r--r-- | soltools/mkdepend/ifparser.c | 60 | ||||
-rw-r--r-- | soltools/mkdepend/ifparser.h | 8 | ||||
-rw-r--r-- | soltools/mkdepend/include.c | 2 | ||||
-rw-r--r-- | soltools/mkdepend/main.c | 4 | ||||
-rw-r--r-- | soltools/mkdepend/parse.c | 3 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 3 |
8 files changed, 25 insertions, 76 deletions
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c index f4cdaa55eeb1..7d967741b14f 100644 --- a/soltools/mkdepend/cppsetup.c +++ b/soltools/mkdepend/cppsetup.c @@ -119,10 +119,7 @@ struct _parse_data { }; static const char * -_my_if_errors (ip, cp, expecting) - IfParser *ip; - const char *cp; - const char *expecting; +_my_if_errors (IfParser *ip, const char *cp, const char *expecting) { #ifdef DEBUG_MKDEPEND struct _parse_data *pd = (struct _parse_data *) ip->data; @@ -154,9 +151,7 @@ _my_if_errors (ip, cp, expecting) #define MAXNAMELEN 256 char * -_lookup_variable (var, len) - const char *var; - int len; +_lookup_variable (const char *var, int len) { char tmpbuf[MAXNAMELEN + 1]; @@ -170,10 +165,7 @@ _lookup_variable (var, len) static int -_my_eval_defined (ip, var, len) - IfParser *ip; - const char *var; - int len; +_my_eval_defined (IfParser *ip, const char *var, int len) { (void)ip; if (_lookup_variable (var, len)) @@ -185,10 +177,7 @@ _my_eval_defined (ip, var, len) #define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_') static int -_my_eval_variable (ip, var, len) - IfParser *ip; - const char *var; - int len; +_my_eval_variable (IfParser *ip, const char *var, int len) { char *s; diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index dcb3c1ff923d..94bc2553cb49 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -184,7 +184,7 @@ int match(register char *str, register char **list); void recursive_pr_include(register struct inclist *head, register char *file, register char *base); void recursive_pr_dummy(register struct inclist *head, register char *file); -void inc_clean(); +void inc_clean(void); void fatalerr(char *, ...); void warning(char *, ...); diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c index 6518b1e5a974..f9b4b6639aea 100644 --- a/soltools/mkdepend/ifparser.c +++ b/soltools/mkdepend/ifparser.c @@ -74,10 +74,7 @@ static const char * -parse_variable (g, cp, varp) - IfParser *g; - const char *cp; - const char **varp; +parse_variable (IfParser *g, const char *cp, const char **varp) { SKIPSPACE (cp); @@ -92,10 +89,7 @@ parse_variable (g, cp, varp) static const char * -parse_number (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_number (IfParser *g, const char *cp, int *valp) { SKIPSPACE (cp); @@ -117,10 +111,7 @@ parse_number (g, cp, valp) static const char * -parse_value (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_value (IfParser *g, const char *cp, int *valp) { const char *var; @@ -200,10 +191,7 @@ parse_value (g, cp, valp) static const char * -parse_product (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_product (IfParser *g, const char *cp, int *valp) { int rightval; @@ -235,10 +223,7 @@ parse_product (g, cp, valp) static const char * -parse_sum (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_sum (IfParser *g, const char *cp, int *valp) { int rightval; @@ -261,10 +246,7 @@ parse_sum (g, cp, valp) static const char * -parse_shift (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_shift (IfParser *g, const char *cp, int *valp) { int rightval; @@ -291,10 +273,7 @@ parse_shift (g, cp, valp) static const char * -parse_inequality (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_inequality (IfParser *g, const char *cp, int *valp) { int rightval; @@ -327,10 +306,7 @@ parse_inequality (g, cp, valp) static const char * -parse_equality (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_equality (IfParser *g, const char *cp, int *valp) { int rightval; @@ -357,10 +333,7 @@ parse_equality (g, cp, valp) static const char * -parse_band (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_band (IfParser *g, const char *cp, int *valp) { int rightval; @@ -380,10 +353,7 @@ parse_band (g, cp, valp) static const char * -parse_bor (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_bor (IfParser *g, const char *cp, int *valp) { int rightval; @@ -403,10 +373,7 @@ parse_bor (g, cp, valp) static const char * -parse_land (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_land (IfParser *g, const char *cp, int *valp) { int rightval; @@ -426,10 +393,7 @@ parse_land (g, cp, valp) static const char * -parse_lor (g, cp, valp) - IfParser *g; - const char *cp; - int *valp; +parse_lor (IfParser *g, const char *cp, int *valp) { int rightval; diff --git a/soltools/mkdepend/ifparser.h b/soltools/mkdepend/ifparser.h index a5dfbd38bfdd..c404e43631b1 100644 --- a/soltools/mkdepend/ifparser.h +++ b/soltools/mkdepend/ifparser.h @@ -64,10 +64,10 @@ typedef int Bool; typedef struct _if_parser { struct { /* functions */ - const char *(*handle_error) (/* struct _if_parser *, const char *, - const char * */); - int (*eval_variable) (/* struct _if_parser *, const char *, int */); - int (*eval_defined) (/* struct _if_parser *, const char *, int */); + const char *(*handle_error) (struct _if_parser *, const char *, + const char *); + int (*eval_variable) (struct _if_parser *, const char *, int); + int (*eval_defined) (struct _if_parser *, const char *, int); } funcs; char *data; } IfParser; diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index dbdd1cffeb32..b3448d90c65d 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -317,7 +317,7 @@ void included_by(ip, newfile) ip->i_list[ ip->i_listlen-1 ] = newfile; } -void inc_clean () +void inc_clean (void) { register struct inclist *ip; diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index b636498fc7e3..9b67e3717222 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -163,9 +163,7 @@ struct sigaction sig_act; boolean native_win_slashes = FALSE; -int main(argc, argv) - int argc; - char **argv; +int main(int argc, char **argv) { register char **fp = filelist; register char **incp = includedirs; diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c index 7d95f0ad3a51..bcc5b7ed6cde 100644 --- a/soltools/mkdepend/parse.c +++ b/soltools/mkdepend/parse.c @@ -410,8 +410,7 @@ void define( def, symbols ) hash_define( def, val, symbols ); } -static int hash( str ) - register char *str; +static int hash( register char *str ) { /* Hash (Kernighan and Ritchie) */ register unsigned int hashval = 0; diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index 6ebb01a05068..d02414d6f6b5 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -79,8 +79,7 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist } } -void pr_dummy(ip) - register struct inclist *ip; +void pr_dummy(register struct inclist *ip) { fwrite(ip->i_file, strlen(ip->i_file), 1, stdout); fwrite(" :\n\n", 4, 1, stdout); |