From: Mike Taylor Date: Wed, 4 Oct 2006 16:59:33 +0000 (+0000) Subject: Change K&R-style empty function declarations to explicit ANSI-C (void) prototypes X-Git-Tag: YAZ.2.1.36~21 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=9dfcbb70828f8d5b524c9bb45852246ae1dd6878 Change K&R-style empty function declarations to explicit ANSI-C (void) prototypes --- diff --git a/client/admin.c b/client/admin.c index 9dddf0d..134812f 100644 --- a/client/admin.c +++ b/client/admin.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: admin.c,v 1.21 2005-06-25 15:46:01 adam Exp $ + * $Id: admin.c,v 1.22 2006-10-04 16:59:33 mike Exp $ */ #include @@ -33,7 +33,7 @@ #include "admin.h" /* Helper functions to get to various statics in the client */ -ODR getODROutputStream(); +ODR getODROutputStream(void); extern char *databaseNames[]; extern int num_databaseNames; diff --git a/include/yaz/nfa.h b/include/yaz/nfa.h index 4b7369a..2901746 100644 --- a/include/yaz/nfa.h +++ b/include/yaz/nfa.h @@ -1,6 +1,6 @@ /* Copyright (C) 2006, Index Data ApS * See the file LICENSE for details. - * $Id: nfa.h,v 1.10 2006-08-11 12:43:52 adam Exp $ + * $Id: nfa.h,v 1.11 2006-10-04 16:59:33 mike Exp $ */ /** @@ -89,7 +89,7 @@ typedef struct yaz_nfa_converter yaz_nfa_converter; * \return a pointer to the newly created NFA * * */ -yaz_nfa *yaz_nfa_init(); +yaz_nfa *yaz_nfa_init(void); /** \brief Destroy the whole thing */ void yaz_nfa_destroy( diff --git a/include/yaz/test.h b/include/yaz/test.h index 402f551..a9f5574 100644 --- a/include/yaz/test.h +++ b/include/yaz/test.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: test.h,v 1.9 2006-07-07 13:39:02 heikki Exp $ + * $Id: test.h,v 1.10 2006-10-04 16:59:33 mike Exp $ */ /** \file test.h @@ -16,7 +16,7 @@ #include /** \brief Get the verbosity level */ -int yaz_test_get_verbosity(); +int yaz_test_get_verbosity(void); /** \brief Test OK */ #define YAZ_TEST_TYPE_OK 1 diff --git a/src/test.c b/src/test.c index 7803177..b258b61 100644 --- a/src/test.c +++ b/src/test.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: test.c,v 1.10 2006-07-07 13:39:04 heikki Exp $ + * $Id: test.c,v 1.11 2006-10-04 16:59:33 mike Exp $ */ /** \file test.c @@ -31,7 +31,7 @@ static int test_verbose = 1; static const char *test_prog = 0; static int log_tests = 0; -static FILE *get_file() +static FILE *get_file(void) { if (test_fout) return test_fout; diff --git a/test/nfatest1.c b/test/nfatest1.c index 2d4c8ab..fbce473 100644 --- a/test/nfatest1.c +++ b/test/nfatest1.c @@ -1,7 +1,7 @@ /* Copyright (C) 2006, Index Data ApS * See the file LICENSE for details. * - * $Id: nfatest1.c,v 1.6 2006-05-10 13:58:47 heikki Exp $ + * $Id: nfatest1.c,v 1.7 2006-10-04 16:59:34 mike Exp $ * */ @@ -56,7 +56,7 @@ void test_match(yaz_nfa *n, } } -void construction_test() { +void construction_test(void) { yaz_nfa* n= yaz_nfa_init(); yaz_nfa_char *cp, *cp1, *cp2; yaz_nfa_state *s, *s0, *s1, *s2, *s3, *s4, *s5; @@ -191,7 +191,7 @@ void construction_test() { yaz_nfa_destroy(n); } -void converter_test() { +void converter_test(void) { yaz_nfa* n= yaz_nfa_init(); yaz_nfa_converter *c1, *c2, *c3; yaz_nfa_char str1[]={'a','b','c'}; @@ -346,7 +346,7 @@ void chkbuff( yaz_nfa_char *start, yaz_nfa_char *end, char *exp) { } -void high_level_test() { +void high_level_test(void) { NMEM nmem=nmem_create(); yaz_nfa_char from1[] = {'f','o','o','b','a','r'}; yaz_nfa_char to1[] = {'f','u','b','a','r'}; diff --git a/test/nfaxmltest1.c b/test/nfaxmltest1.c index 754be3b..94ee4c5 100644 --- a/test/nfaxmltest1.c +++ b/test/nfaxmltest1.c @@ -1,7 +1,7 @@ /* Copyright (C) 2006, Index Data ApS * See the file LICENSE for details. * - * $Id: nfaxmltest1.c,v 1.7 2006-07-14 13:06:38 heikki Exp $ + * $Id: nfaxmltest1.c,v 1.8 2006-10-04 16:59:34 mike Exp $ * */ @@ -18,7 +18,7 @@ /** \brief Test parsing of a minimal, valid xml string */ -void test1() { +void test1(void) { char *xmlstr = " " " " " foo " @@ -32,7 +32,7 @@ void test1() { /** \brief Test parsing of a minimal, invalid xml string */ -void test2() { +void test2(void) { yaz_nfa *nfa; char *xmlstr = " " " " @@ -48,7 +48,7 @@ void test2() { } /** \brief Test parsing a few minimal xml files */ -void test3() { +void test3(void) { char *goodfilenames[] = { "nfaxml-simple.xml", "nfaxml-main.xml", /* x-includes nfaxml-include */ @@ -74,7 +74,7 @@ void test3() { } /** \brief Test parsing of a few minimal xml strings, with logical errors */ -void test4() { +void test4(void) { yaz_nfa *nfa; char *xmls[] = { /*a*/" ", @@ -130,7 +130,7 @@ void test4() { } } /* test4 */ -static void test5() { +static void test5(void) { struct conv_test { unsigned char *name; int expresult; diff --git a/test/tst_record_conv.c b/test/tst_record_conv.c index 3606db2..89d1f72 100644 --- a/test/tst_record_conv.c +++ b/test/tst_record_conv.c @@ -2,7 +2,7 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_record_conv.c,v 1.10 2006-08-01 09:28:04 adam Exp $ + * $Id: tst_record_conv.c,v 1.11 2006-10-04 16:59:34 mike Exp $ * */ #include @@ -105,7 +105,7 @@ int conv_configure_test(const char *xmlstring, const char *expect_error, return ret; } -static void tst_configure() +static void tst_configure(void) { YAZ_CHECK(conv_configure_test("", "Missing 'convert' element", 0)); @@ -206,7 +206,7 @@ static int conv_convert_test(yaz_record_conv_t p, return ret; } -static void tst_convert1() +static void tst_convert1(void) { yaz_record_conv_t p = 0; const char *marcxml_rec = @@ -289,7 +289,7 @@ static void tst_convert1() yaz_record_conv_destroy(p); } -static void tst_convert2() +static void tst_convert2(void) { yaz_record_conv_t p = 0; const char *marcxml_rec = diff --git a/test/tst_retrieval.c b/test/tst_retrieval.c index 66c9477..7a2561b 100644 --- a/test/tst_retrieval.c +++ b/test/tst_retrieval.c @@ -2,7 +2,7 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_retrieval.c,v 1.6 2006-07-06 10:17:55 adam Exp $ + * $Id: tst_retrieval.c,v 1.7 2006-10-04 16:59:34 mike Exp $ * */ #include @@ -104,7 +104,7 @@ int conv_configure_test(const char *xmlstring, const char *expect_error, return ret; } -static void tst_configure() +static void tst_configure(void) { YAZ_CHECK(conv_configure_test(" @@ -11,7 +11,7 @@ #include /** \brief build a 100 level query */ -void test1() +void test1(void) { ODR odr = odr_createmem(ODR_ENCODE); YAZ_PQF_Parser parser = yaz_pqf_create(); @@ -39,7 +39,7 @@ void test1() } /** \brief build a circular referenced query */ -void test2() +void test2(void) { ODR odr = odr_createmem(ODR_ENCODE); YAZ_PQF_Parser parser = yaz_pqf_create(); diff --git a/test/tstpquery.c b/test/tstpquery.c index a3c0b25..1084626 100644 --- a/test/tstpquery.c +++ b/test/tstpquery.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstpquery.c,v 1.2 2006-04-01 11:47:41 adam Exp $ + * $Id: tstpquery.c,v 1.3 2006-10-04 16:59:34 mike Exp $ */ #include @@ -55,7 +55,7 @@ int expect_pqf(const char *pqf, const char *expect_pqf, int expect_error) return res; } -static void tst() +static void tst(void) { YAZ_CHECK(expect_pqf("a", "@attrset Bib-1 a", YAZ_PQF_ERROR_NONE)); YAZ_CHECK(expect_pqf("@attr 1=4 a", "@attrset Bib-1 @attr 1=4 a", YAZ_PQF_ERROR_NONE)); diff --git a/test/tstsoap1.c b/test/tstsoap1.c index 2290e83..80df562 100644 --- a/test/tstsoap1.c +++ b/test/tstsoap1.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstsoap1.c,v 1.7 2006-07-06 10:17:55 adam Exp $ + * $Id: tstsoap1.c,v 1.8 2006-10-04 16:59:34 mike Exp $ */ #include @@ -11,7 +11,7 @@ #endif #include -void tst() +void tst(void) { #if YAZ_HAVE_XML2 xmlChar *buf_out; diff --git a/test/tstxmlquery.c b/test/tstxmlquery.c index cd8997a..c79f285 100644 --- a/test/tstxmlquery.c +++ b/test/tstxmlquery.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstxmlquery.c,v 1.12 2006-07-07 12:09:05 marc Exp $ + * $Id: tstxmlquery.c,v 1.13 2006-10-04 16:59:34 mike Exp $ */ #include @@ -104,7 +104,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml, return status; } -static void tst() +static void tst(void) { YAZ_CHECK_EQ(pqf2xml_text("@attr 1=4 bad query", "", 0), PQF_FAILED); #if YAZ_HAVE_XML2 diff --git a/util/yaz-xmlquery.c b/util/yaz-xmlquery.c index b2dc588..3f673df 100644 --- a/util/yaz-xmlquery.c +++ b/util/yaz-xmlquery.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: yaz-xmlquery.c,v 1.3 2006-07-06 10:17:55 adam Exp $ + * $Id: yaz-xmlquery.c,v 1.4 2006-10-04 16:59:34 mike Exp $ */ #include @@ -153,7 +153,7 @@ void xmlfiletopqf(const char *xmlfile) } #endif -void usage() +void usage(void) { fprintf(stderr, "%s [-p pqf] [-x xmlfile]\n", prog); fprintf(stderr, " -p pqf reads pqf. write xml to stdout\n"); diff --git a/zoom/zoom-benchmark.c b/zoom/zoom-benchmark.c index 3cd60c8..0fc1408 100644 --- a/zoom/zoom-benchmark.c +++ b/zoom/zoom-benchmark.c @@ -1,5 +1,5 @@ /* - * $Id: zoom-benchmark.c,v 1.14 2006-09-18 09:40:05 marc Exp $ + * $Id: zoom-benchmark.c,v 1.15 2006-10-04 16:59:35 mike Exp $ * * Asynchronous multi-target client doing search and piggyback retrieval */ @@ -110,7 +110,7 @@ void print_events(int *elc, struct event_line_t *els, -void init_statics() +void init_statics(void) { int i; char nullstring[1] = ""; @@ -193,7 +193,7 @@ long time_usec(struct time_type *ptime) return ptime->usec; } -void print_option_error() +void print_option_error(void) { fprintf(stderr, "zoom-benchmark: Call error\n"); fprintf(stderr, "zoom-benchmark -h host:port -q pqf-query " @@ -276,7 +276,7 @@ void read_params(int argc, char **argv, struct parameters_t *p_parameters){ print_option_error(); } -void print_table_header() +void print_table_header(void) { if (parameters.gnuplot) printf("#"); diff --git a/zoom/zoomtst9.c b/zoom/zoomtst9.c index 8e9898b..f97c84f 100644 --- a/zoom/zoomtst9.c +++ b/zoom/zoomtst9.c @@ -1,4 +1,4 @@ -/* $Id: zoomtst9.c,v 1.3 2006-08-24 13:19:44 adam Exp $ */ +/* $Id: zoomtst9.c,v 1.4 2006-10-04 16:59:35 mike Exp $ */ /** \file zoomtst9.c \brief Extended Service Update @@ -12,7 +12,7 @@ #include #include -static void usage() +static void usage(void) { fprintf(stderr, "usage:\n" "zoomtst9 target [insert|delete|replace|update] id1 rec1 "