From b64382a1e420049b882b87fb05fe058aa6592d1c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 27 Sep 2006 11:38:59 +0000 Subject: [PATCH] Added GCC option -Wstrict-prototypes to buildconf.sh -d. Updated code accordingly. --- buildconf.sh | 4 ++-- client/client.c | 12 ++++++------ include/yaz/cql.h | 4 ++-- src/cqlutil.c | 4 ++-- src/log.c | 9 +++++---- src/mime.h | 4 ++-- src/seshigh.c | 6 +++--- src/statserv.c | 18 +++++++++--------- src/zoom-c.c | 8 ++++---- util/cql2pqf.c | 4 ++-- 10 files changed, 37 insertions(+), 36 deletions(-) diff --git a/buildconf.sh b/buildconf.sh index a4467f7..efe2805 100755 --- a/buildconf.sh +++ b/buildconf.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildconf.sh,v 1.42 2006-08-24 14:29:58 heikki Exp $ +# $Id: buildconf.sh,v 1.43 2006-09-27 11:38:59 adam Exp $ automake=automake aclocal=aclocal @@ -42,7 +42,7 @@ conf_flags="" case $1 in -d) #sh_flags="-g -Wall -Wdeclaration-after-statement -Werror" - sh_flags="-g -Wall -Wdeclaration-after-statement " + sh_flags="-g -Wall -Wdeclaration-after-statement -Wstrict-prototypes" enable_configure=true enable_help=false shift diff --git a/client/client.c b/client/client.c index 2888d17..64e92cc 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.315 2006-09-22 14:09:25 adam Exp $ + * $Id: client.c,v 1.316 2006-09-27 11:38:59 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -180,7 +180,7 @@ int cmd_register_tab(const char* arg); static void close_session (void); -ODR getODROutputStream() +ODR getODROutputStream(void) { return out; } @@ -766,7 +766,7 @@ int cmd_open(const char *arg) return session_connect(cur_host); } -void try_reconnect() +void try_reconnect(void) { char* open_command; @@ -1891,7 +1891,7 @@ const char *get_ill_element (void *clientData, const char *element) return 0; } -static Z_External *create_external_itemRequest() +static Z_External *create_external_itemRequest(void) { struct ill_get_ctl ctl; ILL_ItemRequest *req; @@ -2102,7 +2102,7 @@ static int send_itemorder(const char *type, int itemno) return 0; } -static int only_z3950() +static int only_z3950(void) { if (!conn) { @@ -3638,7 +3638,7 @@ int cmd_push_command(const char* arg) return 1; } -void source_rcfile() +void source_rcfile(void) { /* Look for a $HOME/.yazclientrc and source it if it exists */ struct stat statbuf; diff --git a/include/yaz/cql.h b/include/yaz/cql.h index d745ad0..043e3ed 100644 --- a/include/yaz/cql.h +++ b/include/yaz/cql.h @@ -1,4 +1,4 @@ -/* $Id: cql.h,v 1.13 2005-06-27 22:03:59 adam Exp $ +/* $Id: cql.h,v 1.14 2006-09-27 11:39:00 adam Exp $ Copyright (C) 1995-2005, Index Data ApS Index Data Aps @@ -279,7 +279,7 @@ const char *cql_strerror(int code); * Returns the standard CQL context set URI. */ YAZ_EXPORT -const char *cql_uri(); +const char *cql_uri(void); /** * Compares two CQL strings (for relations, operators, etc) diff --git a/src/cqlutil.c b/src/cqlutil.c index 68daa0e..6342bf9 100644 --- a/src/cqlutil.c +++ b/src/cqlutil.c @@ -1,4 +1,4 @@ -/* $Id: cqlutil.c,v 1.9 2005-06-27 22:03:59 adam Exp $ +/* $Id: cqlutil.c,v 1.10 2006-09-27 11:39:01 adam Exp $ Copyright (C) 1995-2005, Index Data ApS Index Data Aps @@ -84,7 +84,7 @@ struct cql_node *cql_node_mk_boolean(NMEM nmem, const char *op) return p; } -const char *cql_uri() +const char *cql_uri(void) { return "info:srw/cql-context-set/1/cql-v1.1"; } diff --git a/src/log.c b/src/log.c index d4973f2..2ecc858 100644 --- a/src/log.c +++ b/src/log.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: log.c,v 1.38 2006-07-31 10:05:04 adam Exp $ + * $Id: log.c,v 1.39 2006-09-27 11:39:02 adam Exp $ */ /** @@ -55,7 +55,8 @@ char *strerror(int n) #endif -static int default_log_level() { +static int default_log_level(void) +{ char *env = getenv("YAZ_LOG"); if (env != 0) return yaz_log_mask_str_x(env, YLOG_DEFAULT_LEVEL); @@ -120,7 +121,7 @@ static struct { static unsigned int next_log_bit = YLOG_LAST_BIT<<1; /* first dynamic bit */ -static void init_mutex() +static void init_mutex(void) { if (mutex_init_flag) return; @@ -140,7 +141,7 @@ FILE *yaz_log_file(void) return f; } -void yaz_log_close() +void yaz_log_close(void) { if (yaz_file_type == use_file && yaz_global_log_file) { diff --git a/src/mime.h b/src/mime.h index e331d5a..ab8964d 100644 --- a/src/mime.h +++ b/src/mime.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: mime.h,v 1.2 2006-04-20 20:50:51 adam Exp $ + * $Id: mime.h,v 1.3 2006-09-27 11:39:02 adam Exp $ */ /** \file mime.h @@ -14,7 +14,7 @@ typedef struct yaz_mime_info *yaz_mime_types; -yaz_mime_types yaz_mime_types_create(); +yaz_mime_types yaz_mime_types_create(void); void yaz_mime_types_add(yaz_mime_types t, const char *suffix, const char *mime_type); const char *yaz_mime_lookup_suffix(yaz_mime_types t, const char *suffix); diff --git a/src/seshigh.c b/src/seshigh.c index 5132309..079a30d 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.98 2006-09-06 09:35:41 adam Exp $ + * $Id: seshigh.c,v 1.99 2006-09-27 11:39:02 adam Exp $ */ /** * \file seshigh.c @@ -108,7 +108,7 @@ static int log_request = 0; /* one-line logs for requests */ static int log_requestdetail = 0; /* more detailed stuff */ /** get_logbits sets global loglevel bits */ -static void get_logbits() +static void get_logbits(void) { /* needs to be called after parsing cmd-line args that can set loglevels!*/ if (!logbits_set) { @@ -2323,7 +2323,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.98 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.99 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, diff --git a/src/statserv.c b/src/statserv.c index bad214c..5556cd1 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -5,7 +5,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.42 2006-09-14 13:50:24 adam Exp $ + * $Id: statserv.c,v 1.43 2006-09-27 11:39:02 adam Exp $ */ /** @@ -151,7 +151,7 @@ static xmlDocPtr xml_config_doc = 0; #endif #if YAZ_HAVE_XML2 -static xmlNodePtr xml_config_get_root() +static xmlNodePtr xml_config_get_root(void) { xmlNodePtr ptr = 0; if (xml_config_doc) @@ -212,7 +212,7 @@ static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr) } #endif -static struct gfs_server * gfs_server_new() +static struct gfs_server * gfs_server_new(void) { struct gfs_server *n = nmem_malloc(gfs_nmem, sizeof(*n)); memcpy(&n->cb, &control_block, sizeof(control_block)); @@ -327,7 +327,7 @@ int control_association(association *assoc, const char *host, int force_open) return 1; } -static void xml_config_read() +static void xml_config_read(void) { struct gfs_server **gfsp = &gfs_server_list; struct gfs_listen **gfslp = &gfs_listen_list; @@ -466,7 +466,7 @@ static void xml_config_read() *gfsp = 0; } -static void xml_config_open() +static void xml_config_open(void) { if (!getcwd(gfs_root_dir, FILENAME_MAX)) { @@ -509,7 +509,7 @@ static void xml_config_open() #endif } -static void xml_config_close() +static void xml_config_close(void) { #if YAZ_HAVE_XML2 if (xml_config_doc) @@ -529,7 +529,7 @@ static void xml_config_close() #endif } -static void xml_config_add_listeners() +static void xml_config_add_listeners(void) { struct gfs_listen *gfs = gfs_listen_list; int id_no; @@ -541,7 +541,7 @@ static void xml_config_add_listeners() } } -static void xml_config_bend_start() +static void xml_config_bend_start(void) { if (control_block.xml_config[0]) { @@ -567,7 +567,7 @@ static void xml_config_bend_start() } } -static void xml_config_bend_stop() +static void xml_config_bend_stop(void) { if (control_block.xml_config[0]) { diff --git a/src/zoom-c.c b/src/zoom-c.c index 935674b..9918ea0 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.89 2006-09-19 21:09:44 adam Exp $ + * $Id: zoom-c.c,v 1.90 2006-09-27 11:39:02 adam Exp $ */ /** * \file zoom-c.c @@ -58,7 +58,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c); static zoom_ret do_write_ex(ZOOM_connection c, char *buf_out, int len_out); static char *cql2pqf(ZOOM_connection c, const char *cql); -static void initlog() +static void initlog(void) { static int log_level_initialized = 0; if (!log_level_initialized) @@ -678,7 +678,7 @@ void ZOOM_resultset_addref(ZOOM_resultset r) } } -ZOOM_resultset ZOOM_resultset_create() +ZOOM_resultset ZOOM_resultset_create(void) { int i; ZOOM_resultset r = (ZOOM_resultset) xmalloc(sizeof(*r)); @@ -1216,7 +1216,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.89 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.90 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = diff --git a/util/cql2pqf.c b/util/cql2pqf.c index 3c5df41..a0166d7 100644 --- a/util/cql2pqf.c +++ b/util/cql2pqf.c @@ -1,4 +1,4 @@ -/* $Id: cql2pqf.c,v 1.7 2005-06-25 15:46:07 adam Exp $ +/* $Id: cql2pqf.c,v 1.8 2006-09-27 11:39:04 adam Exp $ Copyright (C) 1995-2005, Index Data ApS Index Data Aps @@ -13,7 +13,7 @@ See the file LICENSE. #include #include -static void usage() +static void usage(void) { fprintf (stderr, "usage\n cql2pqf [-n ] []\n"); exit (1); -- 1.7.10.4