sniper Tue Dec 16 16:00:22 2003 EDT Modified files: /php-src/ext/xmlrpc/libxmlrpc simplestring.c xml_element.c xmlrpc.c xmlrpc_introspection.c Log: Fix some compile warnings (patch by Joe Orton) Index: php-src/ext/xmlrpc/libxmlrpc/simplestring.c diff -u php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.4 --- php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 Wed Aug 21 21:25:50 2002 +++ php-src/ext/xmlrpc/libxmlrpc/simplestring.c Tue Dec 16 16:00:21 2003 @@ -31,7 +31,7 @@ */ -static const char rcsid[] = "#(@) $Id: simplestring.c,v 1.3 2002/08/22 01:25:50 sniper Exp $"; +static const char rcsid[] = "#(@) $Id: simplestring.c,v 1.4 2003/12/16 21:00:21 sniper Exp $"; #define SIMPLESTRING_INCR 32 @@ -45,6 +45,9 @@ * 06/2000 * HISTORY * $Log: simplestring.c,v $ + * Revision 1.4 2003/12/16 21:00:21 sniper + * Fix some compile warnings (patch by Joe Orton) + * * Revision 1.3 2002/08/22 01:25:50 sniper * kill some compile warnings * @@ -79,6 +82,7 @@ ******/ #include <stdlib.h> +#include <string.h> #include "simplestring.h" #define my_free(thing) if(thing) {free(thing); thing = 0;} Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.4 php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.5 --- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.4 Tue Nov 26 18:01:16 2002 +++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c Tue Dec 16 16:00:21 2003 @@ -31,7 +31,7 @@ */ -static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.4 2002/11/26 23:01:16 fmk Exp $"; +static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.5 2003/12/16 21:00:21 sniper Exp $"; @@ -44,6 +44,9 @@ * 06/2000 * HISTORY * $Log: xml_element.c,v $ + * Revision 1.5 2003/12/16 21:00:21 sniper + * Fix some compile warnings (patch by Joe Orton) + * * Revision 1.4 2002/11/26 23:01:16 fmk * removing unused variables * @@ -98,6 +101,7 @@ #endif #include <stdlib.h> #include <string.h> +#include <ctype.h> #include "xml_element.h" #include "queue.h" @@ -471,18 +475,20 @@ } /* 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 @@ -696,7 +702,7 @@ 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)); } @@ -705,7 +711,7 @@ "\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: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4 php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.5 --- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4 Fri Jul 5 00:43:53 2002 +++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c Tue Dec 16 16:00:21 2003 @@ -31,7 +31,7 @@ */ -static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.4 2002/07/05 04:43:53 danda Exp $"; +static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.5 2003/12/16 21:00:21 sniper Exp $"; /****h* ABOUT/xmlrpc @@ -43,6 +43,9 @@ * 9/1999 - 10/2000 * HISTORY * $Log: xmlrpc.c,v $ + * Revision 1.5 2003/12/16 21:00:21 sniper + * Fix some compile warnings (patch by Joe Orton) + * * 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 * @@ -122,6 +125,7 @@ #include <string.h> #include <stdarg.h> #include <time.h> +#include <ctype.h> #include "queue.h" #include "xmlrpc.h" @@ -704,7 +708,7 @@ 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 */ @@ -815,13 +819,6 @@ return v; } -static const char* get_string(const char* buf, int bDup) { - if(bDup) { - return strdup(buf); - } - return buf; -} - /*******/ /****f* VALUE/XMLRPC_SetValueID_Case @@ -1047,8 +1044,6 @@ val = XMLRPC_CreateValueEmpty(); if(val) { - XMLRPC_VECTOR *pSIV = NULL; - if(XMLRPC_SetIsVector(val, type)) { if(id) { const char *pSVI = NULL; @@ -1609,6 +1604,8 @@ } } break; + default: + break; } } return xReturn; @@ -2447,6 +2444,7 @@ return "struct"; } } + return "unknown"; } /****f* VALUE/XMLRPC_ServerFindMethod Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c:1.3 php-src/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c:1.4 --- php-src/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c:1.3 Fri Jul 5 00:43:53 2002 +++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c Tue Dec 16 16:00:21 2003 @@ -36,6 +36,9 @@ * Dan Libby, aka danda ([EMAIL PROTECTED]) * HISTORY * $Log: xmlrpc_introspection.c,v $ + * Revision 1.4 2003/12/16 21:00:21 sniper + * Fix some compile warnings (patch by Joe Orton) + * * 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 * @@ -346,7 +349,7 @@ 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) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php