Fix several compile warnings
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 30 Dec 2003 00:29:53 +0000 (00:29 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 30 Dec 2003 00:29:53 +0000 (00:29 +0000)
src/seshigh.c
src/srw.c
src/srwutil.c
src/unix.c
src/zgdu.c
src/zoom-c.c

index 7523a98..8dd5782 100644 (file)
@@ -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,
index f17833b..7100dbf 100644 (file)
--- 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 <yaz/srw.h>
@@ -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, 
index 24a9189..998deb9 100644 (file)
@@ -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 <yaz/srw.h>
+#include <yaz/yaz-iconv.h>
 
 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++;
index c38c205..8a60065 100644 (file)
@@ -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
     {
index b38233f..fa92153 100644 (file)
@@ -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 <yaz/odr.h>
 #include <yaz/yaz-version.h>
+#include <yaz/yaz-iconv.h>
 #include <yaz/zgdu.h>
 
 static int decode_headers_content(ODR o, int off, Z_HTTP_Header **headers,
index d400ece..e84c25e 100644 (file)
@@ -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"))