From 87aa2dc20992208fd7478d14425c1e395a57e0c4 Mon Sep 17 00:00:00 2001 From: Stanislav Kholmanskikh Date: Fri, 11 Apr 2014 11:45:19 +0400 Subject: lib, tools, pan: old-style function definition fixes No functional changes. No "cleanup". Just fixes for "old-style function definition" compile warnings. Signed-off-by: Stanislav Kholmanskikh --- pan/reporter.c | 12 ++++-------- pan/scan.l | 10 ++++------ pan/symbol.c | 2 +- pan/tag_report.c | 21 ++++++--------------- pan/zoolib.c | 2 +- 5 files changed, 16 insertions(+), 31 deletions(-) (limited to 'pan') diff --git a/pan/reporter.c b/pan/reporter.c index d1dee3acd..7b4a1e01e 100644 --- a/pan/reporter.c +++ b/pan/reporter.c @@ -79,8 +79,7 @@ static int (*test_end_func) (SYM, SYM, SYM) = scanner_test_end; * (4) go thru all tags and report each as described at the beginning of * this file */ -static int scanner_reporter(tags) -SYM tags; +static int scanner_reporter(SYM tags) { DBT Key, Data; SYM Tag, Keys; @@ -179,8 +178,7 @@ SYM tags; * under another key tree with almost zero brainwork because a SYM * is what the DATA area points to. */ -static int scanner_test_end(alltags, ctag, keys) -SYM alltags, ctag, keys; +static int scanner_test_end(SYM alltags, SYM ctag, SYM keys) { static int notag = 0; /* counter for records with no tag (error) */ char tagname[KEYSIZE]; /* used when creating name (see above) */ @@ -233,14 +231,12 @@ SYM alltags, ctag, keys; return 0; } -static int iscanner_reporter(tags) -SYM tags; +static int iscanner_reporter(SYM tags) { return 0; } -static int iscanner_test_end(alltags, ctag, keys) -SYM alltags, ctag, keys; +static int iscanner_test_end(SYM alltags, SYM ctag, SYM keys) { if (alltags == NULL || keys == NULL || ctag == NULL) return -1; /* for really messed up test output */ diff --git a/pan/scan.l b/pan/scan.l index aa5a1c6c8..fdc33f330 100644 --- a/pan/scan.l +++ b/pan/scan.l @@ -285,7 +285,7 @@ S [ \t]+ * BEGIN the CUTS state. */ int -begin_cuts() +begin_cuts(void) { BEGIN CUTS; return 0; @@ -295,8 +295,7 @@ begin_cuts() * Calls lex repeatedly until all input is seen. */ int -scanner(tags) - SYM tags; +scanner(SYM tags) { alltags = tags; /* move into global scope for lex actions */ @@ -313,8 +312,7 @@ scanner(tags) * toss all the output. */ static int -test_output(tag, keys) - SYM tag, keys; +test_output(SYM tag, SYM keys) { char *at; @@ -433,7 +431,7 @@ lex_files(char **names) * return "-1" and lex will end. */ int -yywrap() +yywrap(void) { extern FILE *yyin; extern int yylineno; /* Line number from Lex */ diff --git a/pan/symbol.c b/pan/symbol.c index ab056bcd0..d7b90af1e 100644 --- a/pan/symbol.c +++ b/pan/symbol.c @@ -82,7 +82,7 @@ static char *sym_error = NULL; * mknode(...) allocates a new symbol table entry */ -SYM newsym() +SYM newsym(void) { SYM h; diff --git a/pan/tag_report.c b/pan/tag_report.c index 61caabd56..eb8fb3dbc 100644 --- a/pan/tag_report.c +++ b/pan/tag_report.c @@ -52,10 +52,7 @@ static char *worst_case(char *, char *); * This is the central results reporting function. All standard report * format results are printed thru test_result. */ -int test_result(tag, tcid, tc, result, tags) -char *tag, *tcid, *tc; -char *result; -SYM tags; +int test_result(char *tag, char *tcid, char *tc, char *result, SYM tags) { char *expert, expkey[KEYSIZE]; register char *c; @@ -109,9 +106,7 @@ SYM tags; * report an error if they don't match. */ -int cuts_report(tags, keys, at, tag) -SYM tags, keys; -char *at, *tag; +int cuts_report(SYM tags, SYM keys, char *at, char *tag) { DBT Key, Data; @@ -227,8 +222,7 @@ char *at, *tag; * (4) go thru all tags and report each as described at the beginning of * this file */ -int tag_report(alltags, ctag, keys) -SYM alltags, ctag, keys; +int tag_report(SYM alltags, SYM ctag, SYM keys) { extern int extended; @@ -380,8 +374,7 @@ SYM alltags, ctag, keys; * Print a header made up of the RTS keywords * In "extended" mode, print the header to stderr. */ -int print_header(tags) -SYM tags; +int print_header(SYM tags) { DBT Key, Data; char key_get[255]; @@ -422,8 +415,7 @@ SYM tags; * This is passed s SYM for the current tag and the initiation keys. * The text seen by lex is in yytext (global). */ -int cuts_testcase(tag, keys) -SYM tag, keys; +int cuts_testcase(SYM tag, SYM keys) { char *cuts_info[6]; char key[KEYSIZE]; @@ -462,8 +454,7 @@ SYM tag, keys; /* * Determine a "worst case" status from two given statuses. */ -static char *worst_case(t1, t2) -char *t1, *t2; +static char *worst_case(char *t1, char *t2) { /* NULL-terminated table, ordered from worst-case to best-case */ static char *worst[] = { diff --git a/pan/zoolib.c b/pan/zoolib.c index 568ffffaf..afdc7069b 100644 --- a/pan/zoolib.c +++ b/pan/zoolib.c @@ -71,7 +71,7 @@ static int zoo_unlock(zoo_t z); char *cat_args(int argc, char **argv); /* zoo_getname(): create a filename to use for the zoo */ -char *zoo_getname() +char *zoo_getname(void) { char buf[1024]; char *zoo; -- cgit v1.2.3