]> granicus.if.org Git - php/commitdiff
MFH: fix compile warnings
authorfoobar <sniper@php.net>
Tue, 16 Dec 2003 21:00:36 +0000 (21:00 +0000)
committerfoobar <sniper@php.net>
Tue, 16 Dec 2003 21:00:36 +0000 (21:00 +0000)
ext/xmlrpc/libxmlrpc/simplestring.c
ext/xmlrpc/libxmlrpc/xml_element.c
ext/xmlrpc/libxmlrpc/xmlrpc.c
ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c

index 011c253225b15ca4999d106b3b9b47dd5a2040ab..7211d2cd94195610c6acdc8f2ab2a3ec4978cd2f 100644 (file)
@@ -45,6 +45,9 @@ static const char rcsid[] = "#(@) $Id$";
  *   06/2000
  * HISTORY
  *   $Log$
+ *   Revision 1.3  2002/08/22 01:25:50  sniper
+ *   kill some compile warnings
+ *
  *   Revision 1.2  2002/07/05 04:43:53  danda
  *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
  *
@@ -76,6 +79,7 @@ static const char rcsid[] = "#(@) $Id$";
  ******/
 
 #include <stdlib.h>
+#include <string.h>
 #include "simplestring.h"
 
 #define my_free(thing)  if(thing) {free(thing); thing = 0;}
index 3b2335c4089395acd127cbc79276c57ef358be8e..9e65dce0a1a5e69aefe6db7fe53282ce1731f14c 100644 (file)
@@ -44,6 +44,9 @@ static const char rcsid[] = "#(@) $Id$";
  *   06/2000
  * HISTORY
  *   $Log$
+ *   Revision 1.3.4.1  2002/11/27 04:07:00  fmk
+ *   MFH
+ *
  *   Revision 1.3  2002/07/05 04:43:53  danda
  *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
  *
@@ -95,6 +98,7 @@ static const char rcsid[] = "#(@) $Id$";
 #endif
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 
 #include "xml_element.h"
 #include "queue.h"
@@ -468,18 +472,20 @@ static void xml_element_serialize(xml_element *el, int (*fptr)(void *data, const
 }
 
 /* print buf to file */
-static file_out_fptr(void *f, const char *text, int size)
+static int file_out_fptr(void *f, const char *text, int size)
 {
    fputs(text, (FILE *)f);
+   return 0;
 }
 
 /* print buf to simplestring */
-static simplestring_out_fptr(void *f, const char *text, int size)
+static int simplestring_out_fptr(void *f, const char *text, int size)
 {
    simplestring* buf = (simplestring*)f;
    if(buf) {
       simplestring_addn(buf, text, size);
    }
+   return 0;
 }
 
 /****f* xml_element/xml_elem_serialize_to_string
@@ -693,7 +699,7 @@ xml_element* xml_elem_parse_buf(const char* in_buf, int len, XML_ELEM_INPUT_OPTI
          if(byte_idx >= 0) {
              snprintf(buf, 
                       sizeof(buf),
-                      "\n\tdata beginning %i before byte index: %s\n",
+                      "\n\tdata beginning %ld before byte index: %s\n",
                       byte_idx > 10  ? 10 : byte_idx,
                       in_buf + (byte_idx > 10 ? byte_idx - 10 : byte_idx));
          }
@@ -702,7 +708,7 @@ xml_element* xml_elem_parse_buf(const char* in_buf, int len, XML_ELEM_INPUT_OPTI
                 "\tdescription: %s\n"
                 "\tline: %i\n"
                 "\tcolumn: %i\n"
-                "\tbyte index: %i\n"
+                "\tbyte index: %ld\n"
                 "\ttotal bytes: %i\n%s ",
                 err_code, error_str, line_num, 
                 col_num, byte_idx, byte_total, buf);
index 3eca7065a809a36f6c4fe78a71ce182ff5194177..bb3e6e379b2a2b04b8d78aada20aa158013da4f4 100644 (file)
@@ -43,6 +43,9 @@ static const char rcsid[] = "#(@) $Id$";
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log$
+ *   Revision 1.4  2002/07/05 04:43:53  danda
+ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
+ *
  *   Revision 1.22  2002/03/09 23:15:44  danda
  *   add fault interrogation funcs
  *
@@ -119,6 +122,7 @@ static const char rcsid[] = "#(@) $Id$";
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
+#include <ctype.h>
 
 #include "queue.h"
 #include "xmlrpc.h"
@@ -701,7 +705,7 @@ static XMLRPC_VALUE map_expat_errors(XML_ELEM_ERROR error) {
       XMLRPC_ERROR_CODE code;
       char buf[1024];
       snprintf(buf, sizeof(buf), 
-               "error occurred at line %i, column %i, byte index %i", 
+               "error occurred at line %ld, column %ld, byte index %ld", 
                                         error->line, error->column, error->byte_index);
 
       /* expat specific errors */
@@ -812,13 +816,6 @@ XMLRPC_VALUE XMLRPC_CreateValueEmpty() {
    return v;
 }
 
-static const char* get_string(const char* buf, int bDup) {
-   if(bDup) {
-      return strdup(buf);
-   }
-   return buf;
-}
-
 /*******/
 
 /****f* VALUE/XMLRPC_SetValueID_Case
@@ -1044,8 +1041,6 @@ XMLRPC_VALUE XMLRPC_CreateVector(const char* id, XMLRPC_VECTOR_TYPE type) {
 
    val = XMLRPC_CreateValueEmpty();
    if(val) {
-      XMLRPC_VECTOR *pSIV = NULL;
-
       if(XMLRPC_SetIsVector(val, type)) {
          if(id) {
             const char *pSVI = NULL;
@@ -1606,6 +1601,8 @@ XMLRPC_VALUE XMLRPC_DupValueNew (XMLRPC_VALUE xSource) {
                                }
                        }
                        break;
+               default:
+                       break;
                }
        }
        return xReturn;
@@ -2444,6 +2441,7 @@ const char* type_to_str(XMLRPC_VALUE_TYPE type, XMLRPC_VECTOR_TYPE vtype) {
                 return "struct";
           }
     }
+    return "unknown";
 }
 
 /****f* VALUE/XMLRPC_ServerFindMethod
index bc1853ea7342dfc62cdd1869a01a67d0faaf9cc1..78ec65803844c04b83809aa99c81d512b4622056 100644 (file)
@@ -36,6 +36,9 @@
  *   Dan Libby, aka danda  (dan@libby.com)
  * HISTORY
  *   $Log$
+ *   Revision 1.3  2002/07/05 04:43:53  danda
+ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
+ *
  *   Revision 1.9  2001/09/29 21:58:05  danda
  *   adding cvs log to history section
  *
@@ -343,7 +346,7 @@ XMLRPC_VALUE xml_element_to_method_description(xml_element* el, XMLRPC_ERROR err
          const char* ptype = !strcmp(el->name, "value") ? type : basetype;
          if(ptype) {
             if(Q_Size(&el->children) &&
-               !strcmp(ptype, "array") || !strcmp(ptype, "struct") || !strcmp(ptype, "mixed")) {
+               (!strcmp(ptype, "array") || !strcmp(ptype, "struct") || !strcmp(ptype, "mixed"))) {
                xSubList = XMLRPC_CreateVector("member", xmlrpc_vector_array);
 
                if(xSubList) {