From b1419c61a0ac369638256f2afd1fc6b8ecd8fa34 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 30 Dec 2003 00:29:53 +0000 Subject: [PATCH] Fix several compile warnings --- src/seshigh.c | 5 ++--- src/srw.c | 4 +--- src/srwutil.c | 14 ++------------ src/unix.c | 16 ++++++++-------- src/zgdu.c | 3 ++- src/zoom-c.c | 6 ++---- 6 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/seshigh.c b/src/seshigh.c index 7523a98..8dd5782 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.10 2003-12-30 00:13:05 adam Exp $ + * $Id: seshigh.c,v 1.11 2003-12-30 00:29:53 adam Exp $ */ /* @@ -1057,7 +1057,6 @@ static void process_http_request(association *assoc, request *req) { /* SRW package */ char *db = "Default"; - char *srw_version = 0; const char *p0 = hreq->path, *p1; Z_SRW_PDU *sr = soap_package->u.generic->p; @@ -1562,7 +1561,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.10 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.11 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, diff --git a/src/srw.c b/src/srw.c index f17833b..7100dbf 100644 --- a/src/srw.c +++ b/src/srw.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.9 2003-12-30 00:16:24 adam Exp $ + * $Id: srw.c,v 1.10 2003-12-30 00:29:53 adam Exp $ */ #include @@ -326,8 +326,6 @@ static int yaz_srw_term(ODR o, xmlNodePtr pptr, Z_SRW_scanTerm *term, term->displayTerm = 0; for (ptr = pptr->children; ptr; ptr = ptr->next) { - char *spack = 0; - if (match_xsd_string(ptr, "value", o, &term->value)) ; else if (match_xsd_integer(ptr, "numberOfRecords", o, diff --git a/src/srwutil.c b/src/srwutil.c index 24a9189..998deb9 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -2,10 +2,11 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srwutil.c,v 1.1 2003-12-20 00:51:19 adam Exp $ + * $Id: srwutil.c,v 1.2 2003-12-30 00:29:53 adam Exp $ */ #include +#include static int hex_digit (int ch) { @@ -84,7 +85,6 @@ int yaz_check_for_srw(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, const char *p0 = hreq->path, *p1; Z_SOAP *soap_package = 0; int ret = -1; - int http_code = 500; const char *charset_p = 0; char *charset = 0; @@ -152,16 +152,6 @@ int yaz_check_for_sru(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, char *db = "Default"; const char *p0 = hreq->path, *p1; const char *operation = 0; -#if HAVE_XML2 - int ret = -1; - char *charset = 0; - Z_SOAP *soap_package = 0; - static Z_SOAP_Handler soap_handlers[2] = { - {"http://www.loc.gov/zing/srw/", 0, - (Z_SOAP_fun) yaz_srw_codec}, - {0, 0, 0} - }; -#endif if (*p0 == '/') p0++; diff --git a/src/unix.c b/src/unix.c index c38c205..8a60065 100644 --- a/src/unix.c +++ b/src/unix.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: unix.c,v 1.2 2003-10-29 13:26:34 adam Exp $ + * $Id: unix.c,v 1.3 2003-12-30 00:29:53 adam Exp $ * UNIX socket COMSTACK. By Morten Bøgeskov. */ #ifndef WIN32 @@ -177,11 +177,11 @@ static void *unix_straddr(COMSTACK h, const char *str) sp->uid = sp->gid = sp->umask = -1; - if (eol = strchr(s, ',')) + if ((eol = strchr(s, ','))) { do { - if (eol = strchr(s, ',')) + if ((eol = strchr(s, ','))) *eol++ = '\0'; if (sp->uid == -1 && strncmp(s, "user=", 5) == 0) { @@ -197,7 +197,7 @@ static void *unix_straddr(COMSTACK h, const char *str) { printf("No such user\n"); free(f); - return; + return 0; } sp->uid = pw->pw_uid; } @@ -216,7 +216,7 @@ static void *unix_straddr(COMSTACK h, const char *str) { printf("No such group\n"); free(f); - return; + return 0; } sp->gid = gr->gr_gid; } @@ -232,7 +232,7 @@ static void *unix_straddr(COMSTACK h, const char *str) { printf("Invalid umask\n"); free(f); - return; + return 0; } } else if (file == NULL && strncmp(s, "file=", 5) == 0) @@ -244,9 +244,9 @@ static void *unix_straddr(COMSTACK h, const char *str) { printf("invalid or double argument: %s\n", s); free(f); - return; + return 0; } - } while(s = eol); + } while((s = eol)); } else { diff --git a/src/zgdu.c b/src/zgdu.c index b38233f..fa92153 100644 --- a/src/zgdu.c +++ b/src/zgdu.c @@ -2,11 +2,12 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: zgdu.c,v 1.2 2003-12-21 11:33:29 adam Exp $ + * $Id: zgdu.c,v 1.3 2003-12-30 00:29:53 adam Exp $ */ #include #include +#include #include static int decode_headers_content(ODR o, int off, Z_HTTP_Header **headers, diff --git a/src/zoom-c.c b/src/zoom-c.c index d400ece..e84c25e 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2003, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.14 2003-12-20 19:11:39 adam Exp $ + * $Id: zoom-c.c,v 1.15 2003-12-30 00:29:53 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -918,7 +918,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) ZOOM_options_get(c->options, "implementationName"), odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.14 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.15 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, @@ -1570,7 +1570,6 @@ ZOOM_record_get (ZOOM_record rec, const char *type_spec, int *len) charset); else if (r->which == Z_External_octet) { - yaz_marc_t mt; const char *ret_buf; switch (ent->value) { @@ -1630,7 +1629,6 @@ ZOOM_record_get (ZOOM_record rec, const char *type_spec, int *len) else if (r->which == Z_External_octet) { const char *ret_buf; - yaz_marc_t mt; int marc_decode_type = YAZ_MARC_MARCXML; if (!strcmp(type, "oai")) -- 1.7.10.4