summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-12-16 21:00:21 +0000
committerfoobar <sniper@php.net>2003-12-16 21:00:21 +0000
commitbb8b077ce776c8bea4c84bce731eca38585154bb (patch)
treefdd146c8a94a73f0a06d43f2f8c3cbb4424cb1ab
parent23bab357de378abe2d166c8a23a4a4c3ac4ce723 (diff)
downloadphp-git-bb8b077ce776c8bea4c84bce731eca38585154bb.tar.gz
Fix some compile warnings (patch by Joe Orton)
-rw-r--r--ext/xmlrpc/libxmlrpc/simplestring.c4
-rw-r--r--ext/xmlrpc/libxmlrpc/xml_element.c14
-rw-r--r--ext/xmlrpc/libxmlrpc/xmlrpc.c18
-rw-r--r--ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c5
4 files changed, 26 insertions, 15 deletions
diff --git a/ext/xmlrpc/libxmlrpc/simplestring.c b/ext/xmlrpc/libxmlrpc/simplestring.c
index 011c253225..7211d2cd94 100644
--- a/ext/xmlrpc/libxmlrpc/simplestring.c
+++ b/ext/xmlrpc/libxmlrpc/simplestring.c
@@ -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;}
diff --git a/ext/xmlrpc/libxmlrpc/xml_element.c b/ext/xmlrpc/libxmlrpc/xml_element.c
index 3b2335c408..53fcd74c2d 100644
--- a/ext/xmlrpc/libxmlrpc/xml_element.c
+++ b/ext/xmlrpc/libxmlrpc/xml_element.c
@@ -44,6 +44,9 @@ static const char rcsid[] = "#(@) $Id$";
* 06/2000
* HISTORY
* $Log$
+ * Revision 1.4 2002/11/26 23:01:16 fmk
+ * removing unused variables
+ *
* 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);
diff --git a/ext/xmlrpc/libxmlrpc/xmlrpc.c b/ext/xmlrpc/libxmlrpc/xmlrpc.c
index 3eca7065a8..bb3e6e379b 100644
--- a/ext/xmlrpc/libxmlrpc/xmlrpc.c
+++ b/ext/xmlrpc/libxmlrpc/xmlrpc.c
@@ -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
diff --git a/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c b/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c
index bc1853ea73..78ec658038 100644
--- a/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c
+++ b/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c
@@ -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) {